<?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: msCAN problem with MC9S12XS128 in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/msCAN-problem-with-MC9S12XS128/m-p/162401#M5172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is my mistake. I did not enable&amp;nbsp;the CAN transceiver in my test board &lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The communication is working very fine now &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the same time, I feel sorry to bother all of you guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 13:39:47 GMT</pubDate>
    <dc:creator>nandu</dc:creator>
    <dc:date>2009-03-25T13:39:47Z</dc:date>
    <item>
      <title>msCAN problem with MC9S12XS128</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/msCAN-problem-with-MC9S12XS128/m-p/162400#M5171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear every one, I'm working with mc9s12xs128 MCU. I'm just trying to implement the basic CAN communication between my computer and my target board . But I couldn't do it successfully. I just did the following the things in my simple projetct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Initialize the msCAN module.&lt;/P&gt;&lt;P&gt;2. Enable the CAN Rx interrupt.&lt;/P&gt;&lt;P&gt;3. Implemented the ISR for the CAN Rx interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, after I download the code to the MCU throuh a usb type P&amp;amp;E cable and run it and&amp;nbsp;when I send&amp;nbsp;a&amp;nbsp;CAN message using CAN king or CANoe, the Rx interrupt is never reached. The RSTAT[1:0] register value shows as a binary value of '10' that means,Rx error counter &amp;gt; 127. Can anyone plz help me out from this situation. Below shown&amp;nbsp;are my project details...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;Project&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; : Basic CAN comm. between&amp;nbsp;a PC and a CAN node&amp;nbsp;&lt;/P&gt;&lt;P&gt;Target Board with :&amp;nbsp; mc9s12xs128 MCU with 8Mhz osc clock&lt;/P&gt;&lt;P&gt;MCU&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; mc9s12xs128&lt;/P&gt;&lt;P&gt;Compiler&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; Codwarrior v.5.7.0&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;unsigned char RxInterruptSucess;&lt;/PRE&gt;&lt;PRE&gt;unsigned char RxD_Buf[8];&lt;/PRE&gt;&lt;PRE&gt;void Init_CAN(void){&amp;nbsp; CAN0CTL0 = 0x01;&amp;nbsp; while ((CAN0CTL1 &amp;amp; 0x01) != 0x01);&amp;nbsp; CAN0CTL1 = 0x80;&amp;nbsp; /* CAN module Enabled, Oscclk = 8MHz */&amp;nbsp; CAN0BTR0 = 0x01;&amp;nbsp; /* SJW = 1Tq clock cycles, Prescale 2 */&amp;nbsp; CAN0BTR1 = 0x14;&amp;nbsp; /* 1 sample per bit,Segment2 = 2Tq, Segment1 = 5Tq */&amp;nbsp; CAN0IDAC = 0x10&amp;nbsp;&amp;nbsp; /* 4 16bit acceptance fileters */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN0IDMR0 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR1 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR2 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR3 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR4 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR5 = 0xFF;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN0IDMR6 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0IDMR7 = 0xFF;&amp;nbsp;&amp;nbsp; CAN0CTL0 &amp;amp;= 0xFE; /* Normal Operation Request */&amp;nbsp; while ((CAN0CTL1 &amp;amp; 0x01) == 0x01); /* wait til node enters normal&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; mode*/ }void main(void){&amp;nbsp; CAN_Init();&amp;nbsp; EnableInterrupts;&amp;nbsp; while(CAN0CTL0_SYNCH == 0) /* wait til node synchronize to bus */&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; }&amp;nbsp; CAN0RIER_RXFIE = 1;&amp;nbsp;&amp;nbsp; /* enable Rx interrupt */&amp;nbsp; for(;;) {}}#pragma CODE_SEG NON_BANKEDinterrupt void _CAN_Rx_Interrupt(void){&amp;nbsp; byte i;&amp;nbsp; for(i=0; i&amp;lt;8; i++)&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; RxD_Buf[i] = *((byte *)&amp;amp;CAN0RXDSR0 + i); /* save received data */&amp;nbsp; }&amp;nbsp;&amp;nbsp; CAN0CTL0|=0x80;&amp;nbsp; /* clear the received frame flag */&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; CAN0RFLG|=0x01;&amp;nbsp; /* clear the RXF flag to release the buffer */&amp;nbsp; RxInterruptSucess = 1;&amp;nbsp;&amp;nbsp; }#pragma CODE_SEG DEFAULT&lt;/PRE&gt;&lt;PRE&gt;And I updated the vector in the .prm file as belowVECTOR ADDRESS 0xFFB2 _CAN_Rx_Interrupt&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not able to find the reason, the time when I send any message to the target, the RSTAT[1:0] immediately goes to the&amp;nbsp;binary value of '10' and Rx interrupt&amp;nbsp;is never occuring. I can see a continuous error frames&amp;nbsp;on&amp;nbsp;CANking or CANoe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly&amp;nbsp;help me to find out the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&amp;amp; Regards&lt;/P&gt;&lt;P&gt;Nandu&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:08:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/msCAN-problem-with-MC9S12XS128/m-p/162400#M5171</guid>
      <dc:creator>nandu</dc:creator>
      <dc:date>2020-10-29T09:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: msCAN problem with MC9S12XS128</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/msCAN-problem-with-MC9S12XS128/m-p/162401#M5172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is my mistake. I did not enable&amp;nbsp;the CAN transceiver in my test board &lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The communication is working very fine now &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the same time, I feel sorry to bother all of you guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:39:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/msCAN-problem-with-MC9S12XS128/m-p/162401#M5172</guid>
      <dc:creator>nandu</dc:creator>
      <dc:date>2009-03-25T13:39:47Z</dc:date>
    </item>
  </channel>
</rss>

