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.

TMS320F28388D: Receive the CANOpen-Remote Frame

Part Number: TMS320F28388D

I need to receive for the Node-Guarding in CANOpen a Frame with COB-ID 700+Node-ID, and answer it with a single Byte 1 Bit Toggle and 7Bit Status. 

//Mailbox2 receive Remote Frame, for Node Guarding

If i do it like that I get no interrupt

CAN_setupMessageObject(CANA_BASE, RX_REMOTE_FRAME_ID, (0x700 + 0x6), CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RX,0,CAN_MSG_OBJ_RX_INT_ENABLE,0);

If I do it like that I get intterupts for every frame, even if the ID is not 0x700 +6 
    CAN_setupMessageObject(CANA_BASE, RX_REMOTE_FRAME_ID, (0x700 + 0x6), CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RXTX_REMOTE,0,CAN_MSG_OBJ_RX_INT_ENABLE,0);

What is the problem? How do I configure the CAN-Bus with the API functions for this frame? 

Thank you in advance!

 

  • Now I understand the problem, i have another mailbox with the same identiefier for sending: 
        //Mailbox1 transmit Bootup, Node Guarding, Heartbeat, 1 Byte
        CAN_setupMessageObject(CANA_BASE,TX_BOOT_UP_ID,(0x700 + 0x6),CAN_MSG_FRAME_STD,CAN_MSG_OBJ_TYPE_TX,0,CAN_MSG_OBJ_TX_INT_ENABLE,1);

    If I use different IDs everything works as expected. 

    I need to send a Boot-Up Message at the beginning and than do Node guarding. What is the correct solution for this from your side? 

    Shall I reconfigure the MessageBox with TX_BOOT_UP_ID after sending the boot up to RX_REMOTE_FRAME_ID like above? 

    Or do you have a better solution for sending and receiving messages with same identifier? 
    Or is there a possibility to trigger an CAN_MSG_OBJ_TYPE_RXTX_REMOTE, to be send without a received remote frame? 

  • Hello Markus,

    Can you try this and see if it works?

    CAN_setupMessageObject(CANA_BASE, RX_REMOTE_FRAME_ID, (0x700 + 0x6), CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RXTX_REMOTE,(0x700 + 0x6),(CAN_MSG_OBJ_RX_INT_ENABLE|CAN_MSG_OBJ_USE_ID_FILTER),0);

    Above basically enables message filtering and only accepts the node ID specified as (0x700 + 6) and applied the same maskID so it will only respond to that node ID.

    Regards,

    Joseph

  • Hello Joseph,

    Thank you very much for your help.

    I already tried  your solution. The problem was that it also responds to 0x716, 0x717, 0x726, 0x727 ....Therefore I changed the ID Mask to -> 0x7FF this  works better, and only 0x706 is answered.

    But still I have the problem, that I can't send the remote frame at software start up. What is the solution for this? 

    Kind Regards, 

    Markus 

  • Hello Markus,

    By software start up, you mean after the F28388x powers up, runs the internal bootcode and the local initialization of the F28388x?  In the SW start up, has the CAN module been initialized and message objects defined, RX/TX GPIO channel assignment done and bit timings defined?  You may have already checked this but just wanted confirmation.  It may help to look at the value of CAN_ES (Error Status) and CAN_ERRC (Error counters) register contents as soon as the remote frame is sent after SW start up. These registers may be able to pinpoint what may have happened when the remote frame was sent.

    Regards,

    Joseph