<?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>S12 / MagniV MicrocontrollersのトピックMSCAN sync S12X</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-sync-S12X/m-p/172558#M5880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to use the MSCAN driver from Softec to test my target board.The program works fine on the demo board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void MSCANInit(unsigned char can_num){&amp;nbsp; volatile unsigned char *can_pt;&amp;nbsp; can_pt = can_periph[can_num];&amp;nbsp;&amp;nbsp;&amp;nbsp; // If MSCAN peripheral is not in Initialization Mode,&amp;nbsp;&amp;nbsp; // enables the Inizialization Mode Request&amp;nbsp; if(!(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK)){&amp;nbsp;&amp;nbsp;&amp;nbsp; can_pt[CANCTL0] = CANCTL0_INITRQ_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; }&amp;nbsp; // Enables MSCAN peripheral and chooses Oscillator Clock,&amp;nbsp;&amp;nbsp; // Loop Disabled and Normal Operation&amp;nbsp; can_pt[CANCTL1] = 0x80;&amp;nbsp; // Configures SJW = 3Tq and Prescaler = 2&amp;nbsp; can_pt[CANBTR0] = 0x03;&amp;nbsp; // Configures One Sample, Time Segment 1 = 6Tq and Time Segment 2 = 3Tq&amp;nbsp; // TSEG1 = PROP_SEG + PHASE_SEG1 and TSEG2 = PHASE_SEG2&amp;nbsp;&amp;nbsp; can_pt[CANBTR1] = 0x3a;&amp;nbsp; // Disables all the Filters&amp;nbsp; can_pt[CANIDMR_1B+0] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+1] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+2] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+3] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+0] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+1] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+2] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+3] = 0xFF;&amp;nbsp; // Restarts MSCAN peripheral and waits for Initialization Mode exit&amp;nbsp; can_pt[CANCTL0] = 0x00;&amp;nbsp; while(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK)&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; // Waits for MSCAN synchronization with the CAN bus&amp;nbsp; while(!(can_pt[CANCTL0]&amp;amp;CANCTL0_SYNCH_MASK))&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in my target board, the program cannot go through that while loop :&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; // Waits for MSCAN synchronization with the CAN bus&amp;nbsp; while(!(can_pt[CANCTL0]&amp;amp;CANCTL0_SYNCH_MASK))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using TJA1041 on my target board instead of TJA1054 on the demo board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've prob the pin and I get 2.35v on both CANH and CANL&amp;nbsp; which seems normal to me.&amp;nbsp; I read 121.75 ohm between the two line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have any clue of what's going on. I tried to connect the board to a CAN bus using CAN King and sending random frame but nothing happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:21:08 GMT</pubDate>
    <dc:creator>Pascalfm</dc:creator>
    <dc:date>2020-10-29T09:21:08Z</dc:date>
    <item>
      <title>MSCAN sync S12X</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-sync-S12X/m-p/172558#M5880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to use the MSCAN driver from Softec to test my target board.The program works fine on the demo board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void MSCANInit(unsigned char can_num){&amp;nbsp; volatile unsigned char *can_pt;&amp;nbsp; can_pt = can_periph[can_num];&amp;nbsp;&amp;nbsp;&amp;nbsp; // If MSCAN peripheral is not in Initialization Mode,&amp;nbsp;&amp;nbsp; // enables the Inizialization Mode Request&amp;nbsp; if(!(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK)){&amp;nbsp;&amp;nbsp;&amp;nbsp; can_pt[CANCTL0] = CANCTL0_INITRQ_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; }&amp;nbsp; // Enables MSCAN peripheral and chooses Oscillator Clock,&amp;nbsp;&amp;nbsp; // Loop Disabled and Normal Operation&amp;nbsp; can_pt[CANCTL1] = 0x80;&amp;nbsp; // Configures SJW = 3Tq and Prescaler = 2&amp;nbsp; can_pt[CANBTR0] = 0x03;&amp;nbsp; // Configures One Sample, Time Segment 1 = 6Tq and Time Segment 2 = 3Tq&amp;nbsp; // TSEG1 = PROP_SEG + PHASE_SEG1 and TSEG2 = PHASE_SEG2&amp;nbsp;&amp;nbsp; can_pt[CANBTR1] = 0x3a;&amp;nbsp; // Disables all the Filters&amp;nbsp; can_pt[CANIDMR_1B+0] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+1] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+2] = 0xFF;&amp;nbsp; can_pt[CANIDMR_1B+3] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+0] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+1] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+2] = 0xFF;&amp;nbsp; can_pt[CANIDMR_2B+3] = 0xFF;&amp;nbsp; // Restarts MSCAN peripheral and waits for Initialization Mode exit&amp;nbsp; can_pt[CANCTL0] = 0x00;&amp;nbsp; while(can_pt[CANCTL1]&amp;amp;CANCTL1_INITAK_MASK)&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; // Waits for MSCAN synchronization with the CAN bus&amp;nbsp; while(!(can_pt[CANCTL0]&amp;amp;CANCTL0_SYNCH_MASK))&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in my target board, the program cannot go through that while loop :&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; // Waits for MSCAN synchronization with the CAN bus&amp;nbsp; while(!(can_pt[CANCTL0]&amp;amp;CANCTL0_SYNCH_MASK))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using TJA1041 on my target board instead of TJA1054 on the demo board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've prob the pin and I get 2.35v on both CANH and CANL&amp;nbsp; which seems normal to me.&amp;nbsp; I read 121.75 ohm between the two line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have any clue of what's going on. I tried to connect the board to a CAN bus using CAN King and sending random frame but nothing happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:21:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-sync-S12X/m-p/172558#M5880</guid>
      <dc:creator>Pascalfm</dc:creator>
      <dc:date>2020-10-29T09:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: MSCAN sync S12X</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-sync-S12X/m-p/172559#M5881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SOLVE!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem was that I was using the pin for the CAN 4 but I code it for the CAN 0...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 04:14:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-sync-S12X/m-p/172559#M5881</guid>
      <dc:creator>Pascalfm</dc:creator>
      <dc:date>2010-12-29T04:14:21Z</dc:date>
    </item>
  </channel>
</rss>

