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:
- first is executed on CPU1,
- once is finished all the peripherals are given to CPU2,
- CPU1 boots CPU2 and waits until this one is finished
- CPU2 boot is executed
- CPU2 notify to CPU1
- 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?