<?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>MPC5xxxのトピックRe: FlexCAN in MPC5746C</title>
    <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309810#M18705</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, my typo. It should be INTC_PSR as you mentioned.&lt;BR /&gt;Then check what is a value of INTC Current Priority Register for Processor n (INTC_CPRn) at the time of INTC init. Obviously it is going to be set as the lowest, e.g.&lt;BR /&gt;INTC.CPR[0].B.PRI = 0; /* Lower core 0's INTC current priority to 0 */&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 11:03:39 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2021-07-19T11:03:39Z</dc:date>
    <item>
      <title>FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1305521#M18643</link>
      <description>&lt;P&gt;I am trying to get the MPC5746C (SPC5746CSMMJ6) to work with FlexCAN and I have the following problem:&lt;/P&gt;&lt;P&gt;I can not setup the FlexCAN to work because when I try to set the CAN reg: CAN_3.MCR.R, I get a IVOR1 exception according to:&lt;BR /&gt;Exception Handling/Control Registers:&lt;BR /&gt;MCSR: 0x00086004&lt;BR /&gt;&amp;nbsp; &amp;nbsp; BUS_WRERR = 1 Write bus error on buffered store to bus with DSI&lt;BR /&gt;&amp;nbsp; &amp;nbsp; G = 1 Guarded instruction Error Report&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ST = 1 Store type instruction Error Report&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MAV = 1 MCAR Address Valid&lt;BR /&gt;MCAR: 0xFBEC4000&lt;/P&gt;&lt;P&gt;What shall I change or what have I missed to setup to make it possible to get the FlexCAN to work?&lt;/P&gt;&lt;P&gt;/Best regards Torbjörn&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 15:08:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1305521#M18643</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-09T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1305983#M18649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;do you have module clocked? Check&amp;nbsp;MC_ME_PS2 register and if needed configure&amp;nbsp;MC_ME_PCTL73.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 07:45:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1305983#M18649</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-07-12T07:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306068#M18653</link>
      <description>&lt;P&gt;&lt;SPAN&gt;MC_ME_PS2:&amp;nbsp;&lt;/SPAN&gt;0x00020000&lt;BR /&gt;&lt;SPAN&gt;MC_ME_PCTL73: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To what should I setup the MC_ME_PCTL73?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't even read the CAN reg:&amp;nbsp;CAN_3.MCR.R&amp;nbsp;without getting a exception.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/BR Torbjörn&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 09:21:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306068#M18653</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-12T09:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306176#M18656</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try to set&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MC_ME.RUN_PC[0].R = 0x000000FE; /* Configures peripheral clock for all RUN modes */&lt;BR /&gt;MC_ME.PCTL[73].B.RUN_CFG = 0x0; /* FlexCAN 3 : select peri. cfg. RUN_PC[0] */&lt;/P&gt;
&lt;P&gt;and do mode transition, e.g. to DRUN mode&lt;/P&gt;
&lt;P&gt;MC_ME.DRUN_MC.R = 0x00130072; /* MVRON = 1, FLAON = RUN mode, PLLON=1, FXOSCON = 1, FIRCON = 1, SYSCLK = PLL PHI_0 */&lt;BR /&gt;MC_ME.MCTL.R = 0x30005AF0; /* Target mode = DRUN, KEY = 5AF0 */&lt;BR /&gt;MC_ME.MCTL.R = 0x3000A50F; /* Target mode = DRUN, KEY = A50F */&lt;/P&gt;
&lt;P&gt;while(MC_ME.GS.B.S_MTRANS == 1); /* Wait for mode transition complete */&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:55:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306176#M18656</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-07-12T12:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306246#M18657</link>
      <description>&lt;P&gt;I have used this example from the manual but never got it to work:&lt;/P&gt;&lt;P&gt;Example 1: Minimal Code to Bring Up a PLL:&lt;/P&gt;&lt;P&gt;/* F160 - max 160 MHz (/1) */&lt;BR /&gt;MC_CGM.SC_DC0.B.DIV = 0;&lt;/P&gt;&lt;P&gt;/* S80 - max 80 MHz (/2) */&lt;BR /&gt;/* MC_CGM_SC_DC1[DIV] and MC_CGM_SC_DC5[DIV] must be equal at all times */&lt;BR /&gt;MC_CGM.SC_DC1.B.DIV = 1;&lt;/P&gt;&lt;P&gt;/* FS80 - max 80 MHz (/2) */&lt;BR /&gt;/* MC_CGM_SC_DC1[DIV] and MC_CGM_SC_DC5[DIV] must be equal at all times */&lt;BR /&gt;MC_CGM.SC_DC5.R = MC_CGM.SC_DC1.R; /* 80 MHz max */&lt;/P&gt;&lt;P&gt;/* S40 - max 40 MHz (/4) */&lt;BR /&gt;MC_CGM.SC_DC2.B.DIV = 3;&lt;/P&gt;&lt;P&gt;/* F40 - max 40 MHz (/4) */&lt;BR /&gt;// MC_CGM.SC_DC3.B.DIV = 3; Here I am also getting a exception so I removed this line&lt;/P&gt;&lt;P&gt;/* F80 - max 80 MHz */&lt;BR /&gt;// MC_CGM.SC_DC4.B.DIV = 1; Here I am also getting a exception so I removed this line&lt;/P&gt;&lt;P&gt;/* enable all modes, enable all peripherals */&lt;BR /&gt;MC_ME.ME.R = 0x000005FF;&lt;BR /&gt;MC_ME.RUN_PC[0].R = 0x000000FE;&lt;/P&gt;&lt;P&gt;/* Connect XOSC to PLL */&lt;BR /&gt;MC_CGM.AC5_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P&gt;/* Configure PLL0 Dividers - 160MHz from 40Mhx XOSC */&lt;BR /&gt;PLLDIG.PLLDV.B.PREDIV = 2;&lt;BR /&gt;PLLDIG.PLLDV.B.MFD = 32;&lt;BR /&gt;PLLDIG.PLLDV.B.RFDPHI = 1;&lt;BR /&gt;PLLDIG.PLLCAL3.R = 0x09C3C062;&lt;BR /&gt;PLLDIG.PLLFD.B.SMDEN = 1; /* Sigma delta modulation enabled */&lt;/P&gt;&lt;P&gt;/* switch to PLL */&lt;BR /&gt;MC_ME.DRUN_MC.R = 0x00130172; /* FLASH in normal mode, PLLON, FXOSC ON, Use PLL_PHI_0 */&lt;BR /&gt;MC_ME.MCTL.R = 0x30005AF0; /* DRUN target mode + KEY */&lt;BR /&gt;MC_ME.MCTL.R = 0x3000A50F; /* DRUN target mode + KEY Inverted */&lt;/P&gt;&lt;P&gt;while(0 == MC_ME.GS.B.S_PLLON); /* ME_GS Wait for PLL stabilization */&lt;BR /&gt;// while(1 == MC_ME.GS.B.S_MTRANS);/* Wait for mode transition complete */ Here I never got S_MTRANS to change to 0&lt;/P&gt;&lt;P&gt;Now when I changed&amp;nbsp;MC_ME.DRUN_MC.R from 0x00130172 to 0x00130072 it works better and I can continue with setting up the FlexCAN...&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as you can see above I still get exceptions when I try to set:&lt;BR /&gt;MC_CGM.SC_DC3.B.DIV = 3&lt;BR /&gt;MC_CGM.SC_DC4.B.DIV = 1&lt;BR /&gt;but it seems that this regs are setup correct anyway.&lt;/P&gt;&lt;P&gt;/Thanks Torbjörn&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:24:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1306246#M18657</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-12T14:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1307056#M18668</link>
      <description>&lt;P&gt;Now after I changed MC_ME.DRUN_MC.R to 0x00130072 it is working better, getting S_MTRANS = 0 and no exception when setting CAN_3.MCR.R.&lt;/P&gt;&lt;P&gt;But still I can't get FlexCAN to work when I try to send a CAN message.&lt;BR /&gt;CAN_3.ESR1 before sending: 0x00040080 (IDLE=1 and SYNCH=1)&lt;BR /&gt;CAN_3.ESR1 after sending(CAN_3.MB[0].CS.B.CODE = 0xC;): 0x00284036 (ERRINT=1, BOFFINT=1, FLTCONF=3, IDLE=0, BIT0ERR=1, SYNCH=0, BOFFDONEINT=1, ERROVR=1)&lt;/P&gt;&lt;P&gt;/BR Torbjörn&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 15:02:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1307056#M18668</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-13T15:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1307485#M18674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you got bit errors, so module does not see what is transmitting. Check if&amp;nbsp;CAN transceiver is enabled, proper CAN bus termination is used and MCU is connected properly to it.&lt;BR /&gt;Also check CAN bit timing setting.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 07:44:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1307485#M18674</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-07-14T07:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309108#M18688</link>
      <description>&lt;P&gt;I have fixed some pin configuration problem related to the hardware and now the CAN message transmission is working.&lt;/P&gt;&lt;P&gt;I am now working with CAN message reception and I can see that the CAN message is received in my selected MB (CAN_3.MB[8]) but I am not getting any interrupt. I have tried to setup CAN_3.IMASK1 for selected MB. Any idea what I missed regarding interrupts?&lt;/P&gt;&lt;P&gt;/BR Torbjörn&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 12:02:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309108#M18688</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-16T12:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309455#M18697</link>
      <description>&lt;P&gt;Thanks for your sharing,That's pretty cool.&lt;/P&gt;&lt;P&gt;&lt;A title="https://www.newnewsnet.com" href="https://www.newnewsnet.com" target="_self"&gt;https://www.newnewsnet.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 02:08:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309455#M18697</guid>
      <dc:creator>zackwang</dc:creator>
      <dc:date>2021-07-19T02:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309631#M18700</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check if you did following,&lt;BR /&gt;- set respective bit in CAN_3.IMASK1 for selected MB&lt;BR /&gt;- be sure INTC is properly initialized and interrupt enabled&lt;BR /&gt;- assign ISR function for correct vector number (#606) in vector table&lt;BR /&gt;- select priority/core for interrupt in INTC_PCR[606]&lt;/P&gt;&lt;P&gt;BR, Petr&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 07:12:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309631#M18700</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-07-19T07:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309738#M18702</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have marked my answers with &lt;FONT color="#FF0000"&gt;red&lt;/FONT&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;- set respective bit in CAN_3.IMASK1 for selected MB -&amp;nbsp;&lt;FONT color="#FF0000"&gt;I have already setup this&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- be sure INTC is properly initialized and interrupt enabled - &lt;FONT color="#FF0000"&gt;It is based on NXP examples and should work&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- assign ISR function for correct vector number (#606) in vector table -&amp;nbsp;&lt;FONT color="#FF0000"&gt;I have already setup this&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- select priority/core for interrupt in INTC_PCR[606] - &lt;FONT color="#FF0000"&gt;I think you mean INC_PSR[606].&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#FF0000"&gt;I thought this was setup ok but now when I increased the priority to 15 it is working and I get an interrupt when receiving a CAN message.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;/Best regards Torbjörn&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 09:42:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309738#M18702</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-19T09:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309810#M18705</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, my typo. It should be INTC_PSR as you mentioned.&lt;BR /&gt;Then check what is a value of INTC Current Priority Register for Processor n (INTC_CPRn) at the time of INTC init. Obviously it is going to be set as the lowest, e.g.&lt;BR /&gt;INTC.CPR[0].B.PRI = 0; /* Lower core 0's INTC current priority to 0 */&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 11:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309810#M18705</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-07-19T11:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN in MPC5746C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309843#M18707</link>
      <description>&lt;P&gt;Yes the&amp;nbsp;&lt;SPAN&gt;INTC Current Priority Register for Processor 0 (INTC_CPR0)&amp;nbsp;is 0 at the time of INTC init (INTC.CPR0.B.PRI = 0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I was using prio = 0 for the CAN_3 reception from the beginning and it works if I increase it to &amp;gt; 0.&lt;/P&gt;&lt;P&gt;Thanks for all help!&lt;/P&gt;&lt;P&gt;/BR Torbjörn&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 12:00:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/FlexCAN-in-MPC5746C/m-p/1309843#M18707</guid>
      <dc:creator>Torbjörn</dc:creator>
      <dc:date>2021-07-19T12:00:03Z</dc:date>
    </item>
  </channel>
</rss>

