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.

TMS320F28377D: Flash erase command fails on CPU2

Part Number: TMS320F28377D

Hello,

I'm developing a custom bootloader for both CPUs inside the F28377D devices and I'm facing a weird situation.

The bootloader is simple:

  1. first is executed on CPU1,
  2. once is finished all the peripherals are given to CPU2, 
  3. CPU1 boots CPU2 and waits until this one is finished
  4. CPU2 boot is executed
  5. CPU2 notify to CPU1
  6. CPU1 executes a reset

If I load the bootloader to an empty device, it works the first time and the application is executed successfully, but if I "enter in boot mode" again (resetting CPU1) then the bootloader works again too but CPU2 is not able to erase the flash sectors containing data and program of the application. On the other hand, CPU1 is working correctly.

I'm using the F021 API and the resulting error is that the bit EV from the FMSTAT is active.

I have reviewed if there is anything inside the bootloader code being executed from flash (an interrupt or something) but everything is on RAM for both CPUs. I have review the flash pump sempahore use and for every flash command the semaphore is requested.

any idea?

  • Hi,

    1) Did you do a dummy read of the password locations as suggested in the Figure 2-23. CSM Password Match Flow (PMF) in TRM to unsecure the zone that you are trying to erase?

    2) Did you make sure that the PLL config is appropriate when the flash erase failed?

    3) What is the wait-state configuration that you are using?

    4) What is the error that you got from blank check function?  Did you check the address that the blank check function returned?  Is it the first address location of a sector?

    Thanks and regards,

    Vamsi

  • Hi,

    Thanks for your fast response.

    Checking the PLL config I have realised that I was losing the semaphore pump just before the erase command. Now it works perfectly! thanks!

  • Hi,

    Glad that it helped. Note that you don't have to claim the semaphore for every command. Once the semaphore is acquired by CPU2, it will be with CPU2 until it relinquishes the semaphore (as long as there is no any reset).

    Thanks and regards,
    Vamsi