AnsweredAssumed Answered

Flex-CAN on MPC 5643L

Question asked by Michael Lechner on Jan 22, 2015

Hello,

 

the Goal is to get the Flex-Can working. I am using sample code which i found in this forum, it it attached to this message. I am using the MPC5643L-FlexCAN-SimpleRXTX-CW28 project from the packet. The problem is that the code execution stops at line 169 during the initialisation but i have no clue for what mode transition it is waiting. I am grateful for any hints. If you need additional information go ahead.

 

static void InitModesAndClks(void)

{

    int32_t cnt = 0;

 

    ME.MER.R = 0x0000003D;        /* Enable DRUN, RUN0, RUN1 SAFE, RESET modes */

 

    /* Mode Transition to enter RUN1 mode: */

    ME.RUN[1].R = 0x001F0010;       /* RUN1 cfg: 16MHzIRCON,OSC0ON,PLL0OFF,PLL1OFF,syclk=16MIRC */

    ME.MCTL.R = 0x50005AF0;         /* Enter RUN1 Mode & Key */

    ME.MCTL.R = 0x5000A50F;         /* Enter RUN1 Mode & Inverted Key */

  //  while(0 == ME.GS.B.S_XOSC) {};               /* Wait for mode entry to complete */

    while(1 == ME.GS.B.S_MTRANS) {}    /* Wait for mode transition to complete */                                   <-----------------Stops in this line

 

thanks in advance

 

Michael

Original Attachment has been moved to: example.zip

Outcomes