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.

TMS570LS3137: Boot Loader not working as expected for flashing 2 different .bin files

Other Parts Discussed in Thread: TMS570LS3137

art Number: TMS570LS3137

I am using the  TMS570LS3137 Boot loader reference example from the processors.wiki.ti.com/index.php/TMS570_Hercules_MCU_Bootloader web page .

To download the 2 attached files ,

1) For the .bin file has initial 0x00000000 ( ApplicationFlashAreaDummy_with_initial_Zeros.bin) works as expected and downloads the file entirely with no errors .

2) But For the .bin file that has initial data other than 0x00000000 (ApplicationFlashAreaDummy_not_having_initial_Zeros.bin) fails ( only 8 bytes are burned than it fails) to download while the processor hangs at following instruction in bl_flash.c

        while(FAPI_GET_FSM_STATUS!= Fapi_Status_Success);

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/8270.ApplicationFlashAreaDummy_5F00_not_5F00_having_5F00_initial_5F00_Zeros.7z

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/1411.ApplicationFlashAreaDummy_5F00_with_5F00_initial_5F00_Zeros.7z

  • Hello Chandre,

    I will check and come back to you soon.
  • Hello Chandre,

    I don't see any data except for zero in your flash starting at 0x20000 (first screenshot). Before you write any data to the flash, the flash has to be erased first. The flash content is 0xFFFFFFFF after it is erased.
  • Hello Mr. QJ Wang ,

    Sorry the Images were not fully explanatory I have update the Images with More Explaining Failure I am Seeing with the TMS 570LS3137 CAN Boot loader .
    I have updated the Images Please have a Look at the Images .

    Thanks,
    Chandreshekar Kalvacherla
  • This is for Others who are using this Boot loader and failure occur .
    I have found that the boot loader always accepts multiples of 8 bytes , if the .bin file has 6 bytes to write at end of the file it is OK and works as expected .
    The failure occurs if the size of .bin file is 8002 bytes size and you develop script to write 2 bytes at first and than continue writing 8 bytes every next time




    while( bytes_remain > 0)
    {
    Fapi_issueProgrammingCommand((uint32_t *)dst,
    (uint8_t *)src,
    (uint32_t) bytes, // SHOULD ALWAYS WRITE MULTIPLES OF 8 BYTES not less bytes unless EOF
    0,
    0,
    Fapi_AutoEccGeneration);

    while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );
    while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);

    src += bytes; //Size_In_Bytes;
    dst += bytes; //Size_In_Bytes;
    bytes_remain -= bytes; //Size_In_Bytes;
    if ( bytes_remain < 16){
    bytes = bytes_remain;
    }
    }