3.1.13:Unlock target chip
1:Phenomenon
When PowerWriter successfully connects to the target chip and can correctly read the Option Bytes (OB), but encounters an error when reading other data: "Error Write Flash Addr: The target write flash failed...", and in severe cases, prompts that the chip has disconnected, possible causes for this error include:
- No erase before programming (writing): Please erase the chip first and then retry.
- Chip has write protection enabled: Please set the option bytes to default values, write the default options, and then perform a reset.
- Other reasons: Occasional issues such as unstable communication. Try replacing the cable and retrying. If you are unable to identify the cause, please contact technical support and submit detailed information for assistance.
The second reason above requires unlocking the chip. The method to disable read protection is as follows:
2:Setting option bytes
After connecting the chip, switch to the Option Byte page, and then restore the option word to default, or modify the read protection method to none, as shown in the figure.
3:Write option byte
After turning off the read protection in the option byte, you need to write the option byte to the chip to remove the read protection, as follows:
When offline programming, after setting the option bytes, click "Load" to write the project configuration into the programmer.
4:Operational Demonstration
Unprotected, updating the option byte causes the target chip to initiate an internal erase operation, and depending on the security characteristics of the chip, the original data inside will be lost.
5:Unlock chip when SWD is off
Some chip models in the programming, and the mainstream chip there are some differences, when the chip's option byte is set to the first level of protection or the second level of protection, the chip will automatically turn off the SWD after programming, at this time the specific unlocking mode refer to the CX32 unlocking mode, the chip will automatically turn off the SWD after programming.