<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MC9S12DP512 CAN1 Pin access in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163567#M5235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;reading the mscan2 manual i found a sentence telling me:&lt;/LI&gt;&lt;LI&gt;"Write: Anytime when INITRQ = 1 and INITAK = 1, except CANE which is write once in normal and&lt;BR /&gt;anytime in special system operation modes when the MSCAN is in initialization mode (INITRQ = 1 and&lt;BR /&gt;INITAK = 1)."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;does this mean that i am not able to enable and disable CANE in normal mode after initialization? then it would be strange if the debugger let my program do this&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can't switch CANE off. It is not strange debugger allows to switch CANE off, debugger usually operates chip in special single chip mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;how can i gain access to txd on can1 in another way without setting my controller to a special operation mode?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can't operate MCU in special mode without debugger connected to BKGD pin. Manipulating CAN pins sounds like violating CAN protocol. You should not distrurb whole CAN network!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Nov 2010 18:41:17 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2010-11-17T18:41:17Z</dc:date>
    <item>
      <title>MC9S12DP512 CAN1 Pin access</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163566#M5234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i figured out a strange behaviour of my program.&lt;/P&gt;&lt;P&gt;when i am within the debugger or just flashed my controller, everything works.&lt;/P&gt;&lt;P&gt;if i hit reset or power it up again and run it without the debugger it behaves not as within the debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i managed to identify the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my program initializes all components at the beginning, also the can1 is initialized and enabled (through bean) and i can send around messages etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now i wrote a function to manually toggle the can txd pin to generate a wake pattern as i want it to look like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void FTCAN_generate_wake(void){&amp;nbsp; CAN1CTL0_INITRQ = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get into configuration mode&amp;nbsp; CAN1CTL1_INITAK = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // to be able to disable CAN1.&amp;nbsp; CAN1CTL1_CANE = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Disable CAN1 to take manual control of pin TXD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRM_DDRM3 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set pin TXD as output&amp;nbsp;&amp;nbsp;&amp;nbsp; PTM_PTM3 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Start of wake pattern generation&amp;nbsp; FUNCTIONS_delay(100);&amp;nbsp; PTM_PTM3 = 0;&amp;nbsp; FUNCTIONS_delay(100);&amp;nbsp; PTM_PTM3 = 1;&amp;nbsp; FUNCTIONS_delay(100);&amp;nbsp; PTM_PTM3 = 0;&amp;nbsp; FUNCTIONS_delay(100);&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN1CTL1_CANE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Reenable CAN1 and&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN1CTL1_INITAK = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // close configuration mode.&amp;nbsp; CAN1CTL0_INITRQ = 0;&amp;nbsp; FUNCTIONS_delay(10);&amp;nbsp; CAN1RIER = 127;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Reenable the CAN1 interrupts. Can only be set when not in configuration mode.}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i am in the debugger these waveforms appear on the scope.&lt;/P&gt;&lt;P&gt;when i hit reset and run it without the debugger it happens nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reading the mscan2 manual i found a sentence telling me:&lt;/P&gt;&lt;P&gt;"Write: Anytime when INITRQ = 1 and INITAK = 1, except CANE which is write once in normal and&lt;BR /&gt;anytime in special system operation modes when the MSCAN is in initialization mode (INITRQ = 1 and&lt;BR /&gt;INITAK = 1)."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does this mean that i am not able to enable and disable CANE in normal mode after initialization?&lt;/P&gt;&lt;P&gt;then it would be strange if the debugger let my program do this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i gain access to txd on can1 in another way without setting my controller to a special operation mode?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:09:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163566#M5234</guid>
      <dc:creator>HarryHirn</dc:creator>
      <dc:date>2020-10-29T09:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12DP512 CAN1 Pin access</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163567#M5235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;reading the mscan2 manual i found a sentence telling me:&lt;/LI&gt;&lt;LI&gt;"Write: Anytime when INITRQ = 1 and INITAK = 1, except CANE which is write once in normal and&lt;BR /&gt;anytime in special system operation modes when the MSCAN is in initialization mode (INITRQ = 1 and&lt;BR /&gt;INITAK = 1)."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;does this mean that i am not able to enable and disable CANE in normal mode after initialization? then it would be strange if the debugger let my program do this&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can't switch CANE off. It is not strange debugger allows to switch CANE off, debugger usually operates chip in special single chip mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;how can i gain access to txd on can1 in another way without setting my controller to a special operation mode?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can't operate MCU in special mode without debugger connected to BKGD pin. Manipulating CAN pins sounds like violating CAN protocol. You should not distrurb whole CAN network!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 18:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163567#M5235</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2010-11-17T18:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12DP512 CAN1 Pin access</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163568#M5236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks fpr your reply.&lt;/P&gt;&lt;P&gt;i had the same thing in mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but for me its still a strange debugger behaviour to allow certain code to be executed which wount run at all in final application. thats not really the idea of debugging and development i have in mind. for me the program i write and debug has to have the identical behaviour in my final application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my manipulation on txd pin should only create a condition to wake transceivers like the one i saw in a datasheet.&lt;/P&gt;&lt;P&gt;didnt thought of manipulating network transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nevertheless i think i misunderstood the datasheet...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 15:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163568#M5236</guid>
      <dc:creator>HarryHirn</dc:creator>
      <dc:date>2010-11-18T15:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12DP512 CAN1 Pin access</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163569#M5237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has nothing to do with the debugger at all, the various strange (and mainly pointless) modes of the S12 is the culprit. In "special mode" you can disable CANE, and when CAN is disabled, Port M may be used for general purpose I/O. But as long as CAN is enabled, you cannot use port M (unless you map the CAN peripheral to a different port).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there is never a reason to disable the CAN module. If you want to save power, you should fiddle around with stop and wait modes. Alternatively, if you must use I/O on port M together with CAN, you could try using MODRR in runtime. I wouldn't recommend it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 22:27:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12DP512-CAN1-Pin-access/m-p/163569#M5237</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2010-11-18T22:27:24Z</dc:date>
    </item>
  </channel>
</rss>

