AnsweredAssumed Answered

How do I activate an CAN RX interrupt on an MPC5646C when the frame is available in FIFO?

Question asked by Sandrine Labois on Apr 20, 2017
Latest reply on Apr 20, 2017 by Petr Stancik

Hello,

I have configured the MCR register as above :

        CAN_0.MCR.R = (0
                        | HAL_FLEXCAN_MCR_FRZ          /* enabled to enter Freeze mode */
                        | HAL_FLEXCAN_MCR_FEN          /* enabled Rx FIFO : replacing MB[0...7] */
                        | HAL_FLEXCAN_MCR_HALT         /* enter freeze mode if FRZ bit is set */
                        | HAL_FLEXCAN_MCR_SRXDIS    /* self reception disabled */
                        | HAL_FLEXCAN_MCR_IDAM_00    /* IDAM = 00 : One full ID (standard or extended) per filter element.*/
                        | 0x0000003F);                                  /* MAXMB : enable 64 MBs */

 

      CAN_0.RXFIFO.IDTABLE[0].R = (0x7DF << 1)

      CAN_0.RXFIFO.IDTABLE[1..7].R = 0x00000000

 

        /* ----------------------------------------------------------- */
        /*          RXGMASK global mask                             */
        /* ----------------------------------------------------------- */
        CAN_0.RXGMASK.R  = 0xFFFFFFFF;

        /* ----------------------------------------------------------- */
        /*         RX14MASK buffer 14 mask                       */
        /* ----------------------------------------------------------- */
        CAN_0.RX14MASK.R  = 0xFFFFFFFF;

        /* ----------------------------------------------------------- */
        /*         RX15MASK buffer 15 mask                       */
        /* ----------------------------------------------------------- */
        CAN_0.RX15MASK.R  = 0xFFFFFFFF;

 

At first, did I configure the MPC5646C correctly?

After, how do I activate an CAN RX interrupt when the frame is available in FIFO?

 

Thank you for your support

 

Sandrine

Outcomes