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.
Hi Dear All,
We are developing a project which consist of two parts . Custom bootloader and application firmware.
- Custom bootloader located in flash sector 0.
- An application firmware located from sector 1 and onwards.
With DCSM, sector 0 and sector 1 declared as a Secure (allocate to Zone1).
--
Custom bootloader uses Flash API to program application firmware.
Flash API is loaded to Flash Sector 0, run from RAM LS0 to LS6 ( from 0x8000, 0x3800 length )
--
We know that : if a zone is secured, then Flash API should be executed from the same zone in order to be able to erase or program the Flash sectors of that zone.
So, we declared RAMLS0 to RAMLS6 also as a Secure (allocate to Zone1).
--
We were hoping Flash API could erase/program application firmware successfully (which is located sector 1 and beyond) but it could not.
Then, we added PMF code at the beginning of the custom bootloader, Flash Api erased/programed application firmware successfully.
--
I think for proper Flash operation, executing Flash API from the same zone with application firmware is enough.
I did not understand, why Flash API doesn't work without PMF.
Could you help me on this issue ?
Thanks.
Mehmet.
---
Hi Mehmet,
Sector1 and all the sectors beyond Sector 1 --> All are of these sectors also mapped to Zone 1?
Please confirm.
Thanks and regards,
Vamsi
Hi Mehmet,
Could you provide a clarification: Are you not able to erase/program Sector 1?
Since Sector1 and RAMLS0-6 are of same zone, erase/program of Sector 1 should succeed.
However, other sectors will fail to erase/program since you did not map them to Zone1.
Thanks and regards,
Vamsi
Hi Vamsi
Thanks for your reply.
Could you provide a clarification: Are you not able to erase/program Sector 1?
I am not able to erase/program Sector 1 (current configuration: Sector0, Sector1 and RAMLS0 to LS6 mapped to Zone1)
If I add PMF to the beginning of custom bootloader, Sector 1 is erased/programmed successfully.
However, other sectors will fail to erase/program since you did not map them to Zone1.
I did not map Sector 2 to Zone1.
I load dummy app to Sector 2.
Custom bootloader (which is map to Zone1) is able to erase Sector 2 (which is not map to Zone1).
Thanks,
Mehmet
Hi Mehmet,
Did you configure FLSEM? Please see below from TRM. We mentioned this in the flash API guide as well.
Thanks and regards,
Vamsi
Hi Vamsi,
That's the point!
When I configured FLSEM, it works.
Now Custom bootloader can erase/program other sectors.
Thank you very much.
Best regards