AnsweredAssumed Answered

CAN data register problem?

Question asked by 蔣 維哲 on Sep 5, 2019
Latest reply on Sep 10, 2019 by stanish

My program like this:

"Check_CAN_MB_Status(0, 0, buffer_status);" is a subprogram what detect if there is new data in the CAN register.

When there is new data,"(buffer_status[0] == NEWDATA) "is true.

"Read_CAN_MB_Data(0, 0, Receive_Data);" is read CAN register date and save in "Receive_Data".


Then,I add breakpoint at Switch case 0x0C "RPM_L = RPM & 0x00ff ;"

When I transfer data(0x01 0x41 0x0C 0xff 0xff) with CAN.

The program stops in the right place. but,The variable array"Receive_Data[3]" display 0x00.

What happened with it?

If the variable array"Receive_Data[3]" really is 0x00. Why program stops in there?


Program execution result :"RPM = 0"