Other Parts Discussed in Thread: C2000WARE
Tool/software:
Overview
I am interested in installing firmware updates from a host microcontroller to a C2000 device over SPI. I have reviewed the technical documentation on how this can be supported. Below, I have pasted excerpts from documents SPRUIY4B and SPRABV4H that relate to the following questions.
Questions:
- Is it true that for my use case I need to:
- Execute the ROM Bootloader in SPI Boot Mode to load a flash kernel into RAM. The host microcontroller needs to emulate EEPROM for this.
- Execute the flash kernel in RAM to stream, and install the image into internal Flash.
- Is there a flash kernel example for SPI that can be used as described above?
- Is there a simpler alternative that I am missing?
SPRUIY4B References:
In SPRUIY4B: TMS320F280015x Real-Time Microcontrollers Technical Reference Manual (Rev. B)
... is "Chapter 5 ROM Code and Peripheral Booting"
Section “5.7.7.2.2 SPI Boot Mode”
Excerpt: “If the download is to be performed from an SPI port on another device, then that device must be set up to operate in the slave mode and mimic a serial SPI EEPROM.”
Section “5.8 Application Notes for Using the Bootloaders”
Excerpt: “Table 5-50 and Example 5-2 show the structure of the data stream incoming to the bootloader. The basic structure is the same for all the bootloaders and is based on the C54x source data stream generated by the C54x hex utility. The C28x hex utility (hex2000.exe) has been updated to support this structure. The hex2000.exe utility is included with the C2000 code generation tools.”
SPRABV4H References:
In SPRABV4H Serial Flash Programming of C2000 Microcontrollers (Rev. H)
Section "1 Introduction"
“C2000 devices partially solve the problem of firmware updates by including some basic loading utilities in ROM. Depending on the device and the communications peripherals present, code can be loaded into on-chip RAM using UART, Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C), Ethernet, CAN, and a parallel mode using General Purpose Input/Outputs (GPIOs). A subset of these loaders is present in every C2000 device and they are very easy to use, but they can only load code into RAM. How does one bridge the gap and program their application code into non-volatile memory?”
“This application report aims to solve this problem by using a flash kernel. Flash kernels have been around for some time, but this document discusses the specifics of the kernels and the host application tool found in C2000Ware. While this implementation is targeted at C2000 devices using the SCI peripheral, the same principles apply to all devices in the C2000 product line and all communications options supported by the ROM loaders. A command line tool is provided to parse and transmit the application image from the host PC (Windows only) to the embedded device. In summary, application programming to non-volatile memory like flash requires two steps: 1. Use the SCI ROM bootloader to download a flash kernel to RAM. 2. Run the flash kernel in RAM to download the application to flash.”