Hello. I made device using keazn64 uC on board. I need to lock any action via swd(reading flash image). I tried to edit flashConfig section in stratup file but it doesn't help. I use segger j-link for debugging. How should i do it?
Best regards, Vitaly G.
Hope you are doing well. Could you please clarify what your main objective is? From my understanding , it seems to me that you would like to implement flash security. Is this correct?
In the section 8.3.1 of the Reference Manual, it says that when flash security is active, the SWD port cannot access the memory resources of the MCU, this may be causing you isses. However, what can be done, is a mass erase.
If you have any questions please don't hesitate to ask.
In the section 18.4.2 of the Reference Manual, you can see the register and bits associated with the security of the MCU. You need to write the Flash security byte in the Flash configuration field, so after the reset sequence, the FSEC register is loaded with the contents of this byte.
Let me know if you have further questions.