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 team
Our customer wants to protect the flash, and purpose is to enable write but disable read.
As the figure below, we need to clear FMPREn, but when we do this, the MCU will get stalled and can't execute the code. Do you have any insights? Thanks!
Hi,
As already described in the table, Setting FMPPEn to 1 and FMPREn to 0 is not a realistic protection. Why would you want to protect reads but allow writes. If you select this combination then you are protecting the flash from reading by CPU. If CPU cannot read the flash then it can't execute code. Why would the customer want this protection at all? Most people will choose Execute-Only protection. With this protection, the only way to disable protection is to do a mass-erase of the device.
Hi Charles
Thanks for your quick reply! Actually we tried setting FMPPEn to 0 and FMPREn to 0, that is execute-only mode, but the MCU will be stalled too. It's very tricky, do you have an EVM and test it? Thanks!
Hi,
Are you using the API FlashProtectSet() to configure the protection? What is the return value when you call the API? Can you show your code?