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.

TMS320F28P650DK: TMS320F28P650DK8 CAN boot mode firmware upgrade not working (DCAN flash kernel)

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE

I am working with the TMS320F28P650DK8 controller and attempting to perform a firmware upgrade using the CAN-based boot mode available on the device.

I have followed the procedure outlined in TI’s application note “Application Note: CAN Flash Programming of C2000 Microcontrollers.” Specifically:

  • I downloaded and compiled the DCAN flash kernel (dcan_flash_kernel).

  • Configured the boot pins for CAN boot mode.

  • As per the documentation, I first transmit the kernel at 100 kbps.

  • After a delay of approximately 5 seconds, I transmit the actual firmware at 1 Mbps.

Despite following these steps, the firmware upgrade is not completing successfully.

I would appreciate guidance on the following:

  • Are there any additional configuration steps or timing considerations that I might be missing?

  • Is there a recommended way to verify whether the kernel is being received and executed correctly?

  • Are there known issues or limitations with this procedure on the TMS320F28P650DK8?

Any suggestions or troubleshooting tips would be very helpful.

Thank you.

  • Hello,

    Are you using the host programmer provided in C2000Ware? If not, I would refer to the source files in C2000Ware, included at: "C2000Ware_26_00_00_00\utilities\flash_programmers\dcan_flash_programmer\dcan_flash_programmer"

     I would also confirm that the DCAN flash kernel is configuring the same CAN Tx/Rx GPIO assignments as the boot configuration. Additionally, there are steps on how to use the DCAN flash kernel in Section 4.2.3 of SPRUJH3: https://www.ti.com/lit/ug/sprujh3/sprujh3.pdf

    Best,
    Matt

  • Hi Matt,

    Thank you for your response.

    My main objective is to upgrade the firmware of the **TMS320F28P650DK8** from a Linux host. I followed the steps below:

    1. Downloaded the *dcan_flash_kernel_f28p65x* from the Flash_Kernel and generated the output in `.txt` format.
    2. Created a simple GPIO toggle application as test firmware and generated its output in `.txt` format.
    3. From the Linux host, configured the boot pins as:

    * GPIO72 = 1
    * GPIO84 = 0
    (GPIO4 and GPIO5 are used for CAN TX and RX.)
    4. Performed a power cycle reset.
    5. Initially set the CAN bitrate to **100 kbps** with **2 bytes per frame** and sent the kernel file.
    6. Waited for ~5 seconds, then switched to **1 Mbps** with **8 bytes per frame** to send the application firmware.
    7. Reset the boot mode and performed another power cycle.

    However, after completing these steps, I do not observe any changes in the firmware behavior on the device.

    Additionally, I monitored the CAN bus using an analyzer. I can see that the Linux host is transmitting data as expected. According to the documentation, an acknowledgment should be received from CAN ID **0x02**, but I have not observed any such response.

    I also tried using the C2000Ware_26_00_00_00\utilities\flash_programmers\dcan_flash_programmer\dcan_flash_programmer. It reports that the application was successfully loaded, but I still do not see any change in the hardware behavior.


    Could you please help me identify what might be going wrong or suggest any additional checks?

    Thank you.

  • Hello,

    According to the documentation, an acknowledgment should be received from CAN ID **0x02**, but I have not observed any such response.

    The missing acknowledgment from CAN ID 0x02 strongly indicates the device isn't entering CAN boot mode at all.

    Your boot pin configuration (GPIO72=1, GPIO84=0) is correct for selecting CAN boot when using the default boot selections. However, the Boot ROM uses default CAN pins GPIO59 (TX) and GPIO58 (RX) for CAN Boot Option 0. Your setup uses GPIO4/GPIO5, which corresponds to CAN Boot Option 1 — this requires BOOTDEF to be configured to 0x22 (first through emulation boot for testing and later thought OTP programming).

    Without this configuration, the device enters CAN boot mode but listens on the wrong pins, explaining why it never acknowledges your transmissions.

    I also tried using the C2000Ware_26_00_00_00\utilities\flash_programmers\dcan_flash_programmer\dcan_flash_programmer. It reports that the application was successfully loaded, but I still do not see any change in the hardware behavior.

    The host programmer expects that bytes 3 and 4 of the flash kernel .txt are manually modified to reflect the bit timing change. Please confirm you have done this:

    Source: CAN Flash Programming App Note

    Best,
    Matt

  • Your boot pin configuration (GPIO72=1, GPIO84=0) is correct for selecting CAN boot when using the default boot selections. However, the Boot ROM uses default CAN pins GPIO59 (TX) and GPIO58 (RX) for CAN Boot Option 0. Your setup uses GPIO4/GPIO5, which corresponds to CAN Boot Option 1 — this requires BOOTDEF to be configured to 0x22 (first through emulation boot for testing and later thought OTP programming).

    Hi Matt,

    In the file boot_modes.h file 

    #ifndef BROM_BOOT_MODES_H
    #define BROM_BOOT_MODES_H

    #define CAN_BOOT 0x22U                 // 0x02U //GPIO59; GPIO58
    #define CAN_BOOT_ALT1 0x02U      // 0x22U //GPIO04; GPIO05
    #define CAN_BOOT_ALT2 0x42U     //GPIO19; GPIO18
    #define CAN_BOOT_ALT3 0x62U     //GPIO37, GPIO36
    #define CAN_BOOT_ALT4 0x82U       //GPIO63, GPIO62
    #define CAN_BOOT_SENDTEST 0xA2U //GPIO59; GPIO58
    #define CAN_BOOT_ALT1_SENDTEST 0xC2U //GPIO04; GPIO05
    #define CAN_BOOT_ALT2_SENDTEST 0xE2U //GPIO19; GPIO18

    I have already changed the CAN_BOOT value from 0x02 to 0x22. Still, I'm facing the same issue.


    The host programmer expects that bytes 3 and 4 of the flash kernel .txt are manually modified to reflect the bit timing change. Please confirm you have done this:

    Yes, I have manually changed the value 0xC0 and 0x7A for bytes 3 and 4 . So the kernel file  look 's like 


    AA 08 C0 7A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00
    00 00 00 00 41 00 42 16
    0A 00 00 00 D0 01 00 00 00 00 26 00 00 00 B3 19 01 00 D0 01 00 00 B4 22
    02 00
    1E 00 00 00 B2 01 D0 05 01 00 F3 05 01 00 D5 05 01 00 DA 05 01 00 DF 05
    01 00 E4 05 01 00 E9 05 01 00 C6 05 01 00 EE 05 01 00 AD 05 01 00 B2 05
    01 00 B7 05 01 00 C1 05 01 00 BC 05 01 00 CB 05 01 00

    After changing this i'm trying to run .\dcan_flash_programmer.exe -d f28p65x -k can_flash.txt -a gpio_ex2_toggle.txt -v
    and now i'm facing the Error sending CAN frame issue. 

    70Error sending CAN frame?

    0
    69
    0
    6f
    0
    2e
    0
    68Error sending CAN frame?

    0
    0
    0
    0
    0Error sending CAN frame?

  • Hello,

    To confirm: you've also configured the device's emulation boot configuration registers for CAN Boot 0x22 as well? If you haven't and are using the default boot selection table, then CAN boot with GPIO 58/59 will be initiated by the device.

    This thread may be relevant:  LAUNCHXL-F28P65X: Getting the CAN Flash programming example work 

    Best,

    Matt