Hi,
I am using K20 series of micro controller. I intend to develop a bootloader code and application code. The bootloader code is downloaded using PE Micro Multilink USB Debugger. The p-flash region(0x0000 - 0x3FFF) has been set to protected region.
I then downloaded the Application layer started from 0x4000 and intended to debug it using PE debugger. However, I have not noticed that while downloading, the bootloader code (0x0000 - 0x3FFF) has been erased. Why and how is PE debugger still able to erase the flash region.
I am using PE for generating my linker file(s).
Thanks and regards,
Suman
hi Suman,
how did you protect the Pflash?
One solution in CW 10.1 would be to use Target Tasks to download the application.
To do that, from Target Tasks view, you need to:
2 . Double click on the “Erase” action to edit it
3. Uncheck “Mass erase all devices”
4. Select only FTFL_PFlash256 from the left hand grid box and select the sectors you need to erase
5. Click “Update Erase Action”
7. Save Flash Programmer task with CTRL-S and you may choose to save it to a file in the project folder
8. Open Debug Configurations/<Your Download configuration>, Click on Debugger tab, then on Download Tab
9. Uncheck “Perform Standard Download”, and check “Execute Tasks”
10. Add... the previously edited target task “K40DX256Z”
11. Click Apply
Now the download procedure will not affect the D-Flash anymore.
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------