This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: CAN reception not working

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN

Hi there,

I tried to make a communication between PC and RM46L852 with CAN interface (TCAN1044).

Transmitted data to PC was successfully confirmed using can analyzer.

But no data was not recognized by RM46L "newdata register" when a message sent by can analyzer.

I checked DCAN updated registers before/after sending message and then ErrStat 0x00000007/0x00000010 .

I made a test code based on can demo code (HALCogen).

#define can1 canREG1

/*... wait until message receive on can1 */
while(!canIsRxMessageArrived(can1, canMESSAGE_BOX2));
                                                                <- stuck here! even sending message, canMESSAGE_BOX2 ID=2
canGetData(can1, canMESSAGE_BOX2, rx_data); /* receive on can1 */

Which register should I confirm ?

Any advice is helpful for me.

Thanks in advance.

  •  ErrStat =0x00000010 means a message is received successfully.

    Is message box2 is configured for RX? Can you please post your code and HAL configuration?

  • Thanks for quick response.

    I tested CAN communication with 2 RM46L-boards.

    Setting:

      One is reception, message ID = 1 (This one was connected debugger with JTAG)

      The other is transmission, message ID =1 

    It worked correctly,,, I think a problem is bit timing set... So it is not rm46L issue...

    I try to tune the relevant parameters now.

    But I could not set parameters combination that fit can analyzer selectable timing parameter yet.

    Should I modify C code to get proper parameters without HALCoGen ?

    Thanks.

  • Yes, you can modify the code generated by HAL.

    To make 2 CAN nodes communication, the baudrate should be same. I think you don't have to use the same settings for SEG1 and SEG2.