是不是使用 energyAware Commander 在 flash 擦写保护中，直接保护，以及锁定 flash 和 user page？
I did not try this yet. Maybe you could consider to generate an image file with the lock word to be a specific value as below KB:
Maybe you could also change the hex file manually to modify the lock word. Simplicity Studio also support change the binary or hex file to a specific byte.
Regarding the option to program the EFM32 device, you could refer to this link,
if you are considering a 3rd party programmer HW tool refer to below KB:
My views are my own and do not necessarily represent the views of Silicon Labs
@delu I can lock and unlock the MCU EFM32G880 ,but It seems that I lock the MCU EFM32ZG222 incorrectly.
Do you mind tell me the detailed information how you lock and unlock the Zero Gecko.
How you determined lock and unlock fail on EFM32ZG222?
when I luse the Simplicity Commander and Jlink to lock the EFM32ZG210 , it shows "chip successfully locked", but I can still download the code to the chip. In fact if I lock the EFM32G880 , I can never read or download the chip.
I can only use Flash Erase/Write Protection to protect the not being read, but I cannot lock debug access of the MCU.
I did not understand your operation procedure with Simplicity Commander.
Do you mind tell me the detailed procedure you have done and what difference you see for the Gecko and Zero device?
step1: connect the Zero STK with PC
step2: open simplicity commander.
You could read AN0062 and know how to verify the lock.
My steps are as the followings:
- Open the software simplicity commander.
- Connect the software and my board by jlink.
- Choose the options "Lock Main Flash" and "Lock User Page", the press the button Protect beside "the write protect flash range 00000000->00000000".
It seems that the MCU cannot be written after these steps,but when I remove protection the chip haven't been erased.