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.

TMS320F28P550SJ: SCI Flash Programming

Part Number: TMS320F28P550SJ

Tool/software:

Hi 

I couldn't understand how to load the code into the F28P55's flash using the SCI even though I read the application note: "Serial Flash Programming of C2000 Microcontrollers"

In section 5.4. It seems to suggest that the F28P55 is dual core. The example command loads code on two CPUs. 

"

5. Enter a command with parameters as described below: • Example: serial_flash_programmer.exe -d f28p55x -k flash_kernel_c28x_dual_ex1_c28x1.txt -a led_ex1_c28x_dual_blinky_cpu1.txt -n l ed_ex1_c28x_dual_blinky_cpu2.txt -b 9600 -p COM34 -v -t app_flash_banks_and_sectors.txt

               "

What is the correct command to write the firmware to the F28P55x flash?

How to generate the .txt file from the binary code generated by code composer studio?

Is there a GUI application option to load firmware onto the F28P55x?

  • Hi Ari,

    I will loop in our serial flash programmer expert to assist with this issue. Can you confirm that you are simply trying to follow the guidelines in the serial flash programming app note? Or are you doing any custom configuration not included in the app note?

    Thank you,

    Luke

  • Hi Ari,

    >In section 5.4. It seems to suggest that the F28P55 is dual core. The example command loads code on two CPUs. 

    Section 5.4 states that F28P55x devices have a single-core, only CPU1. Section 5.1 also has a note stating that the following steps do not apply to F28P55x devices.

    >What is the correct command to write the firmware to the F28P55x flash?

    Example command:
    serial_flash_programmer.exe -d f28p55x -k flash_kernel_ex3_sci_flash_kernel.txt -a led_ex1_blinky.txt -b 9600 -p COM42 -v

    >How to generate the .txt file from the binary code generated by code composer studio?
    When generating your CCS project for either the kernel or your application, you need to add the following line from Section 2 of the application note:

    to the following CCS Build Settings window:

    >Is there a GUI application option to load firmware onto the F28P55x?
    Yes, you can load the firmware for the kernel or application through CCS by going to the load program button in the toolbar menu:

    Thanks and regards,

    Charles

  • Hi, Charles

    I didn't understand some points in the application note:

    If the Kernel resides in ROM, why when the CPU boots in serial boot mode, does the kernel not run in the ROM itself? Thus avoiding the need to load the Kernel along with the application via the serial port?

    Even if the kernel can only access flash running in RAM, why doesn't the boot code in ROM transfer the kernel to run in RAM?

    Is it necessary to compile the "f28p55x_flash_ex3_sci_flash_kernel" example to generate the kernel .txt file?

    Why is this file not already provided ready-made and in .txt format?

    And I also noticed that the f28p55x_flash_ex3_sci_flash_kernel example was made to work on a board that has a 20MHZ crystal, my board uses the internal oscillator. So do I need to change the example firmware so that it works on my board?

    Ari

  • Hi Ari,

    >If the Kernel resides in ROM, why when the CPU boots in serial boot mode, does the kernel not run in the ROM itself? Thus avoiding the need to load the Kernel along with the application via the serial port?

    The default SCI Flash Kernel project resides in and operates from RAM, not ROM. If not using CCS to load the kernel (standalone usage), then the kernel can be sent to the device through the device's SCI ROM bootloader.  Once loaded, control will transfer from the SCI ROM bootloader to the SCI Flash Kernel operating in RAM.

    >Even if the kernel can only access flash running in RAM, why doesn't the boot code in ROM transfer the kernel to run in RAM?

    The boot code in the ROM does transfer the kernel into the device. Once loaded, the kernel will take control and run in RAM.

    >Is it necessary to compile the "f28p55x_flash_ex3_sci_flash_kernel" example to generate the kernel .txt file?

    Yes. 

    >Why is this file not already provided ready-made and in .txt format?

    These projects are made available without specific build settings for users to modify for their own needs.

    >And I also noticed that the f28p55x_flash_ex3_sci_flash_kernel example was made to work on a board that has a 20MHZ crystal, my board uses the internal oscillator. So do I need to change the example firmware so that it works on my board?

    Yes, in the Device folder for the project there is the device.h header file which contains symbols for changing the required oscillator for the board. 

    At line 270, there is a comment stating "To use INTOSC as the clock source, comment the #define USE_PLL_SRC_XTAL, and uncomment the #define USE_PLL_SRC_INTOSC" .

    Thanks and regards,

    Charles

  • Hi Charles,

    "The default SCI Flash Kernel project resides in and operates from RAM, not ROM. If not using CCS to load the kernel (standalone usage), then the kernel can be sent to the device through the device's SCI ROM bootloader.  Once loaded, control will transfer from the SCI ROM bootloader to the SCI Flash Kernel operating in RAM."

    "The boot code in the ROM does transfer the kernel into the device. Once loaded, the kernel will take control and run in RAM."

    If I understand what you wrote, I don't need to configure, compile and load the kernel "f28p55x_flash_ex3_sci_flash_kernel.txt" if I am using the default settings, SCIA on the GPIO28/GPIO29 pins?

    If so, what would be the command to load the firmware into the flash, without having to load the kernel? Because I want to use the default kernel, which is in the microcontroller's ROM.

    "...If not using CCS to load the kernel (standalone usage)". Why would CCS be used to load the kernel?

    Ari

  • Hi Ari,

    I should clarify, once the kernel (as .text file) has been loaded through the SCI ROM bootloader, it will reside in and operate from RAM.

    You should still configure and compile the project to generate the text file. 

    >If so, what would be the command to load the firmware into the flash, without having to load the kernel?

    serial_flash_programmer_appln.exe -d f28p55x -k flash_kernel_ex3_sci_flash_kernel.txt -a led_ex1_blinky.txt -b 9600 -p COM42 -v

    Note: If using this version of the command, the kernel (as .out file) must be loaded through CCS and executed before using this command.

    >Why would CCS be used to load the kernel?

    CCS can be used to load the kernel for debugging purposes, as well as to send the application file only to the device.

    Thanks and regards,

    Charles

  • Charles,

    I get it, if you are developing a custom kernel, you load the kernel using CCS and then load the application firmware using the serial_flash_programmer_appln.exe executable.

    And the only thing that the boot code in ROM does is communicate with the serial_flash_programmer.exe application running on a PC and load the kernel into RAM and then the kernel in RAM continues the process by loading the firmware into flash.

    Now I think I understand the process, I just don't understand why it's so complicated. Since the firmware is to be loaded onto the microcontroller's own flash and not just any external flash.

    Thank you very much for your help and patience.

    Ari