hello,
Security register is In address 0x40c, if i want to change it to security I must erase total sector which include address 0x40C, then call program command, but if i erased this sector, code in this sector also will be erased , thus code will abnormal, is my understanding right?
how to set MCU to security when eflash boot?
Solved! Go to Solution.
Hi kui wu,
Thanks for your blessing, wish you also have a good time.
If your question is solved, please help me to mark the correct answer, just to close this case, thanks.
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi kui wu,
0X40C is the FSEC area, it is used to secure the JTAG and the Ezport interfaces.
FSEC also contains the key, the MEEN etc bits.
If you use the backdoor key, then you also can use your own key to unlock it.
If you enable the mass erase, then you can do the mass erase to unlock it.
But if your mass earse is disabled, and SEC is also secured, and the backdoor key is disabled, then the secure leve is to the highest, you can't unsecure it again.
If you want to change your chip mode to secure, you can modify your flash address 0x40C to 0XFC, then the SWD is secured. You can modify the 0X40C in your app code directly, take an example:
The Flashconfig code in the .s file.
So, you don't need to secure it in your app code directly, just in the .s file before you download the code is OK.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
hello,
sorry
My operation is as the following
1.Set Flash issecurity.
2. update security byte in startup file as the following
3. then dowunload
4. The following prompt box will pop up , when click "Yes" it will erase FLash to unsecured.
5. as above description, how to enable MCU to secure?
Hi kui wu,
When you meet the confirm Device is secure, erase to unsecure, it means your chip already be secured.
When you select yes, it just will use the mass erase to unlock the secure mode.
So, your secure operation is working now.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Kerry,
thanks for your answer, i have got it!
wish you happy!
Hi kui wu,
Thanks for your blessing, wish you also have a good time.
If your question is solved, please help me to mark the correct answer, just to close this case, thanks.
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------