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.

TMS320F28379D: CAN BOOT mode and CAN Flash Kernal

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi everyone, 

1.)  I modified can_flash_kernel code for tms320f28379d using DCAN_Boot.c source code which in C:\ti\c2000\C2000Ware_1_00_05_00\libraries\boot_rom\f2837xd\revB\rom_sources\F2837x_bootROM\cpu01-bootROM\source. At the top of the code there is a phase like this: "DCAN boot loader functions for Soprano". But I use LaunchXL F283779d. May it be a problem ?

2.) For GetWordData() function there are two different logic like below. Which one should I use ? 

In Can_Boot for f2806x GetWordData function like below: 

Uint16 CAN_GetWordData()
{
Uint16 wordData;
Uint16 byteData;

wordData = 0x0000;
byteData = 0x0000;

// Fetch the LSB
while(ECanaRegs.CANRMP.all == 0) { }
wordData = (Uint16) ECanaMboxes.MBOX1.MDL.byte.BYTE0; // LS byte

// Fetch the MSB
byteData = (Uint16)ECanaMboxes.MBOX1.MDL.byte.BYTE1; // MS byte

// form the wordData from the MSB:LSB
wordData |= (byteData << 8);

/* Clear all RMPn bits */
ECanaRegs.CANRMP.all = 0xFFFFFFFF;

return wordData;
}

In DCAN_Boot for f28379d GetWordData() function like below: 

Uint16 DCAN_GetWordData()
{
//Wait for a new CAN message to be received in mailbox 1
while (DcanaRegs.CAN_NDAT_21 != 0x1) {;}

//Transfer the message from IF1
DcanaRegs.CAN_IF1CMD.all = 0x00070001;
while (DcanaRegs.CAN_IF1CMD.all & 0x8000) {;}
return (Uint16)DcanaRegs.CAN_IF1DATA.all;

}

Also,  GetWordData function which in SCI_Boot for f28379d similar with  GetWordData function which in Can_Boot.

Which one should I use ? 

Best Regards.

  • Adem

    1). Ignore the comment, that code works for F28379D
    2). You should use the GetWordData for F28379D (the bottom one you showed). F2806x vs F2837xD have two different CANs and each have different registers to configurations.

    Refer to the F28379D technical reference manual and CAN examples in C2000Ware to learn more on the F2837xD CAN.

    Best regards
    Chris