IMPORTANT: Cypress Developer Community currently doesn’t allow sign-in to prepare for the upcoming transition. To learn more, check out our announcement.
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Failure to Receive CAN Message in 16FX C_CAN Sample Code – KBA221416


Failure to Receive CAN Message in 16FX C_CAN Sample Code – KBA221416

Version: **

Translation - Japanese: 16FX C_CANサンプルコードでCANメッセージの受信失敗 - KBA221416 - Community Translated (JA)


In the 16FX (MB96600 series) C_CAN sample project, CAN messages were not received on some RX channels when MessageObjects larger than 16 were used. How can I solve this issue?


In the MB96600 series C-CAN sample code, there is a bug in the c_can.c file, which does not allow any MessageObject number larger than 16 to be passed to the message buffer. This resulted in the failure. The following code is an example to fix the issue:

//MB96620 sample project, c_can.c

Line 137: void TxRx_Judge_0(void)


               unsigned short MsgNbr = 0x00;

              unsigned long MsgBuffer;

              MsgNbr = IO_CAN2.INTR2;                //stor MsgNbr

if( (MsgNbr>=1) && (MsgNbr<=0x20) ) // valid buffer number


                 // MsgBuffer = 0x01 << (MsgNbr-1);    //Original code in sample project.

                  MsgBuffer = ((unsigned long)0x01) << (MsgNbr-1);    //Modified new code.




You can download the MB96600 series sample code from 16FX product webpage.

Version history
Revision #:
1 of 1
Last update:
‎Oct 19, 2017 09:50 PM
Updated by: