Other Parts Discussed in Thread: CONTROLSUITE
I am trying to modify the flash programming example for the Concerto F28M36 to run with the CSM locked. When I include the flash sector I want to program to the secure zone, then erase succeds but programming fails with FMSTAT = 0x1010 (PGV and CSTAT set).
I started from the Controlsuite example and have done the following modifications:
- Text and ramfuncs load section is now only sector N (was sector N + M)
- modified Z1_GRABRAM = 0xFFFFFFFE so the C0 RAM is in Secure Zone 1
- Modified Z1_GRABSECT = 0xFFFFFFD7 so that sectors K + L are in secure zone 1
- Changed the default Z1 CSM password to a value containing 1s and 0s
So in summary, all running code is either in Flash sector N or RAM C0, both belonging to Secure Zone 1. As far as I can understand, this way I should be able to program Flash belonging to Secure Zone 1 without unlocking the CSM, but this is not working.
The example tries to erase and then program sectors K and L, and when I add those to secure Zone 1 via GRABSECT then the Programming Commands results in FMSTAT=0x1010, and when reading the Flash area with the Memory browser (after unlocking via On-chip flash tool), everything is 0xFF.
I have tried reducing the PLL clock but still get the same results, any help appreciated!