SPRAD51A December 2023 – April 2024 F29H850TU , F29H859TU-Q1 , TMS320F2800157 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F28P659DK-Q1
The host is responsible for sending the DCAN kernel image and flash (firmware) image to the MCU. The PEAK PCAN-USB Pro FD CAN bus Analyzer is used as the host. The flash programmer project is built and run on Visual Studio 2019. The host programmer uses the PCAN_Basic API from PEAK. The PCAN_Basic API can be used to send and receive CAN frames on the CAN analyzer.
On the F28003x device, the clock to the MCAN module is switched to the external clock source by the Boot ROM. The external clock is 20MHz in the LaunchPad and the ControlCard. The Boot ROM configures the nominal bit rate to be 100Kbps. The host CAN programmer configures the PEAK CAN analyzer to have the same clock and nominal bit rate value.
The host initializes the analyzer for CAN usage, and sends the kernel over in 2-byte increments, and then sends over the image in 8-byte increments, with a delay of 10 ms between each frame to give the Flash API time to program the data it is receiving into Flash. Once the firmware image has been written, the host CAN programmer exits.
The command line PC utility is a programming solution that can easily be incorporated into scripting environments for applications like production line programming. It was written using Microsoft Visual Studio® in C++. The project and its source can be found in C2000Ware (C2000Ware_x_xx_xx_xx > utilities > flash_programmers > dcan_flash_programmer).
To use this tool to program the C2000 device, ensure that the target board has been reset and is currently in the CAN boot mode and connected to the PC COM port. The host programmer will take in kernel and application files as inputs on the command line. There are also options for quiet or verbose output, and an option to wait on exit before closing the CAN flash programmer application. The command line usage of the tool is described below:
dcan_flash_programmer.exe –d <device> -k <kernel file> -a <app file> [-q] [-w] [-v]
-d <device> | - The name of the device to connect and load to: F28003x |
-k <file> | - The file name for the CPU1 flash kernel. This file must be in the ASCII boot format. |
-a <file> | - The application file name to download or verify to CPU1. This file must be in the ASCII SCI boot format. |
-? Or -h | - Show help. |
-q | - Quiet mode. Disable output to stdout. |
-w | - Wait for a key press before exiting. |
-v | - Enable verbose output. |