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: serial flash programmer - loading data error

Part Number: TMS320F28379D
Other Parts Discussed in Thread: UNIFLASH, C2000WARE

Hello everyone,

I have problem with using serial flash programmer to upload the firmware for F28379D. When I tried to upload the firmware with C2prog using SCI, it funktioned. But there's an error by serial flash programmer.

I checked the flash with the uniflash. Then I found that the data in flash (0x80000 to 0x80041) isn’t uploaded correctly. Somehow 4 words always get lost.

Can you suggest me what’s wrong? Maybe the flash is parted? Because I divide the flash A into 4 parts.

Thank you for your support in advance.

Best regards.

  • Hi,

    You can see in the command window what is returned. It is returning an error address of 0x7C88. This is RAM. You might have some code loading to RAM in your hex file. The SCI flash kernel will not program this directly. This is likely an issue with your CCS project and loading your entire application to RAM.

    Hope this helps. Use the error messages to help you debug this.

    sal
  • Hi Sal,

    Thank you for your answer.

    But what does it mean error address? Is it the address of the memory?
  • Yes. Please read through this application report: www.ti.com/.../sprabv4b.pdf

    sal
  • Thanks.

    I have checked everything in my code and I didn't find what's wrong.
    Somehow I don't understand why I can programm my files with C2Prog, but it has problem with serial flash programmer?

    Do you have any suggestion which I can try to find out the error?
  • Hi,

    Do you have any code loading to RAM? The error address is to RAM, and the kernel is unable to program RAM. Make sure your entire application is linked to load to flash.

    After programming with the serial flash programmer, you can do a verification using CCS or maybe C2Prog. I am not sure if C2Prog offers a verification function. But you could do a verification to see if the flash was programmed correctly.

    sal
  • Hi Sal,

    Thank you for your answer.

    I found the code in my program what makes problem. It's:

    #pragma DATA_SECTION(BOOT_EndToken, "firmware_end");
    const uint32_t BOOT_EndToken = 0x00000000;

    I definite "firmware_end" in command file:

    Memory

    {...

    FIRMWARE_START : origin = 0x080000, length = 0x000002 // FLASHA : origin = 0x080002, length = 0x001FFE
    FIRMWARE_INFO : origin = 0x080002, length = 0x000040
    FIRMWARE : origin = 0x080042, length = 0x001FBC
    FIRMWARE_END: origin = 0x081FFE, length = 0x000002

    ...}

    Section

    {...

    firmware_info: > FIRMWARE_INFO, PAGE = 0,
    RUN_START(_LINKER_FirmwareInfo)

    firmware_start: > FIRMWARE_START, PAGE = 0, ALIGN(4),
    LOAD_START(_LINKER_FirmwareStart)

    firmware_end: > FIRMWARE_END, PAGE = 0,
    RUN_START(_LINKER_FirmwareEnd)

    ...}

    When I commented out the code #pragma SECTION(..., then I could upload the code successfully.

    Do you know why?

    Thanks  

  • This may be because FIRMWARE_END is not on a 64-bit boundary. The flash API will program at a 64-bit boundary.

    sal
  • Hi Sal,

    Thank you for your answer.

    I don't understand it yet what you mean with "64-bit boundary".

    Can you explain me what I can do to correct it?

    Best regards
  • FIRMWARE_END is at address 0x081FFE which is adress 532,478 in decimal.

    64-bits on C2000 is equivalent to the length of 4 16-bit words.

    0x081FFE (532,478) divided by is not a multiple of 4. Therefore, it is not 4 word or 64-bit aligned which it needs to be.

    sal
  • Hi Sal,

    Thank you for your answer! I correct this failure.

    But now I have a problem with uploading the firmware for CPU2.

    I could download the kernel and application for CPU1 successfully. Then I chose 13 or 14 for booting CPU2. But the serial flash programmer hung at "ReadFile(file, &rcvData, 1, &dwRead, NULL);" in "void autobaudLock (void)".

    Then I tried the examples "f2837xD_fw_upgrade_example" of TI in C2000, but it continued to hang at the same spot.

    Do you know about this failure?

    Best regards

  • Please read through this Application Report: www.ti.com/.../sprabv4b.pdf

    You need to use the command to "Run CPU1 Boot CPU2" and then perform a "DFU CPU2" command.

    Also, you need to ensure that the CPU1 kernel you are using has been compiled with dual DPU support. Please see the build configurations.

    sal
  • I use the files in example projects.

    The command for running the application:

    -d f2837xD -k C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\dual\F2837xD_sci_flash_kernels\cpu01\ccs\CPU1_RAM\F2837xD_sci_flash_kernels_cpu01.txt -a C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\dual\blinky_dc\cpu01\ccs\CPU1_FLASH_STANDALONE\blinky_dc_cpu01.txt -m C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\dual\F2837xD_sci_flash_kernels\cpu02\ccs\CPU2_RAM\F2837xD_sci_flash_kernels_cpu02.txt -n C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\dual\blinky_dc\cpu02\ccs\CPU2_FLASH\blinky_dc_cpu02.txt -p COM4 -v

    1. The application serial flash programmer started and downloaded the kernel file of CPU1 completely.

    2. Then I put in "1" for "DFU CPU1". The firmware was also downloaded successfully.

    3. Now I put in "13" for "Run CPU1 and Boot CPU2" to download the kernel file of CPU2 and "0x00000000", "0x00080000" and "0x00082e71" for adresse to branch to.

    4. The programm downloaded the kernel file and always hung at "Attempting autobaud to send function message..."

    I don't know what I did wrong. 

    Have you tried to download two CPUs with serial flash programmer?

  • Hi Sal,

    I showed you what I did. 

    Can you take a look what I did and say me what is wrong, please?

    Or have you tested the serial flash programmer with dual cpu?

    I'm waiting for your information. 

    Thank you. 

  • Yes, we have tested this.

    Can you confirm that the CPU1 kernel you built was with the DUAL configuration. The kernel has 2 build configurations. One which supports only CPU1 and one which supports dual DFU.

    Please rebuild the CPU1 kernel with the DUAL build configuration and begin to debug this yourself and come back with some more specific questions. Then I can help you better.

    Also, address 0x00000000 is not a correct branch address.

    sal