TMS320F28P650SH: DSP can not run to main function after power supply recover

Part Number: TMS320F28P650SH

Tool/software:

We are testing the robust of the bootloader, we disturb the flashing(after flash is erased, the DSP is writing data to the flash) by disconnecting the power supply for the whole system.

Then recover the power supply for the whole system, the DSP is re-powered, but the code is not run into the main function. I use a debug GPIO to toggole in the main function, but the GPIO level is float, not toggle.

Is there any limitation for the DSP lock when the flash is updating?

  • Hi,

    I'm not sure where during the flashing stops (if your codestart wasn't stored before disconnect). The bootloader not booting to the flash entry point is understandable. I'll need some more information on this.

    Thanks,

    Charles

  • The memory map for the bootloader and App is that, the bootloader is located in the range of 0x80000-0x81FFF, the App is located in the range of 0x82000-0xBFFFF. The flash update is via the UART communication to update the data in the APP range.

    If requesting App update, the code will jump to bootloader and do the flash erasing and flash writing.  Where did the flashing stop? According to the flashing sequence, it finished the flash erasing(the function Fapi_issueAsyncCommandhithAddress is complete), the disturbing happens during the loop of the flash writing(the function Fapi_issuePorgrammingCommand is running for loops).

    The entry point address is allocated in the address of 0x80000-0x80001, this range is not updated/changed when doing the App update. And the codestart function is located in the bootloader range which can not removed when App udpate.

  • Hi,

    Thanks for the detail. Going back to the original point made, when device is brought back after power-on reset, what is the program counter stating as entrance point?

  • hello Charles, 

    When I do the JTAG debug on the board, click the "CPU Reset", the PC pointer is on 3feaa2.

    But for the whole system, I do not check the PC pointer after reset. I think it should be the same as JTAG debug, is it?

    If it is not the same as “CPU Reset” on the debug mode, could you please guide me how to get the PC pointer on the whole system?

  • Hi,

    Powering off while writing to flash may corrupt the flash. I think in your boot flow you should check if flash is programmed properly or not.

    Regards,

    Rajeshwary

  • Hello,

    There is a flash check in the code start (boot flow), if the App start address and App end address are not updated to the specific data, it will jump to the bootloader code to wait for flash again. But the problem is that the code start is not executed after a power reset.

    There is a possibility that powering off while writing to flash, even at a very low rate. We should protect the flash from being corrupted and ensure that the code can execute to flash again. This is a requirement from the user side.

  • Hi,

    Looking at the screenshot shared by you code is getting stuck at the address 0x3FEAA2, which is NMI vector address. I believe that that when you do power off during flash programming flash is not programmed correctly causing though you are doing App start address and App end address check in your boot flow. Thus, ECC error are triggered and code is ending up at NMI.

    I would suggest to implement NMI handler in your  code to check at which address ECC error is getting generated and erase that and reprogram that sector.

    Regards,

    Rajeshwary

  • Hi,

    What the screenshot is for the JTAG debug mode, clicking the "CPU reset". 

    Could you please guide me how to define the CPU block resource, is it blocked in the NMI interrupt, or not correctly jumping to the code start address. And how to check the failure resource, ECC error or others. Should I add some debug code in the bootloader code to check this? Or add in the code start code. 

    Please give a example, thanks.

  • Hi,

    I will be able to review this thread by early next week.

    Regards,

    Rajeshwary

  • Hi Miaomiao,

    Closing this thread since issue is resolved.

    In case any further queries please open new thread.

    Regards,

    Rajeshwary