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.

TMS570LS1114: What is the ID number of CAN Comunication according to the safetyMCU_Bootloader example?

Part Number: TMS570LS1114

Dear Experts:

What is the ID number of CAN Communicantion according to the example of safetyMCU_Bootloader(TMS570LS12X)?

I have many questions about the SPNA186.

#define MSG_OBJ_BCAST_TX_ID 1 in bl_can.c

#define MSG_OBJ_BCAST_RX_ID 2 in bl_can.c

①These code is means the ID is 1 or 2 between PC and Bootloader?

②Tx identififier:0x5A(device ID)+CMDs(0x00,0x01,0x02,0x03,0x04,0x05,0x06) is the ID?My PC ID set 0x5A0~0x5A6?It bothers me.

③My program is still stop at:

While((node->NWDATx[regIndex]&bitIndex)==0).

I know I should send the data to Bootloader ,but I fail many times.I don’t make sure the ID number

④Why there is no booloader example for TMS570LS11x?

⑤Sample Code for PC-Side Application could transplant in the device 570LS11x?It seems no copletement project,only apply to RM?or TMS570 other devices?

I am looking forward to your reply.

Qiuchi

 

 

 

 

 

  • Some answers.

    A MsgObj is like a mailbox ID. It is not the CAN ID.

    You will likely need to confirm if you are wanting to use CAN 2.0A (11 bit ID) or CAN 2.0B (29 bit ID). An 11 bit ID needs to be shifted left in the IF1ARB register.

    Good Luck
  • Hello QiuChi,

    As NeilBerry said, the MsgObj is the message object number rather than CAN ID. The message object number is used to determine the location of the message object in CAN RAM: CAN Message RAM base address + (message object number) × 0x20. 0 is not a valid message object number.
    Accesses to the Message RAM are performed via the Interface Register sets: Interface Register 1 and 2 (IF1 and IF2), and Interface Register 3 (IF3).

    The IF1/IF2 Command Register (IF1CMD or IF2CMD) configure and Initiate the transfer between the IF1/IF2 Register sets and the Message RAM.
    A transfer is started when the CPU writes the message number to bits [7:0] of the IF1/IF2 Command Register.

    The CAN ID is 29-bit (extended) or 11-bit (standard) long. It is defined in IF1/IF2 arbitration registers (IF1ARB, IF2ARB). When an incoming message is completely shifted into the CAN core shift register (user invisible), the Message Handler starts to scan of the message RAM for a matching valid message object (arbitration bits and mask bits). If a match occurs, the Message Handler stores the message into the message RAM (location is defined by the MsgObj).

    The example code of CAN bootloader uses 11-bit ID and interface 1 (IF1). The 11-bit ID is defined in IF1ARB[28:18]. The IDs are 0x5A0~0x5A6 and only upper 7 bits (0x5A) are used for acceptance filtering, so the mask register (IF1MSK) is (0x5A << 18). The lower 4 bits of the ID are used for different commands: ping, download, sent data, reset, etc.

    The example for TMS570LS12x can be used for TMS570LS11x without any problem.
  • Dear QJ Wang:

    In fact,I use the USBCAN-II device to updata the program,The Send windows as the follows:

    My Program is stop at the line:


  • Thank your answsers
  • Hi Chi Qiu,

    Please use the library and header files for USBCAN-II. You can not use the nican.c and nican library for USBCAN-II. You can find the example code to using the APIs defined in their USBCAN library.