13.1 Flash Programming Sequence
The device can be programmed in several ways during development and during production.
During development, debugger and/or Flash downloader tools program the application in Flash through the Serial Wire/JTAG Debug Port and set the corresponding GPNVM bit according to the desired Boot mode on the next start-up. Lock bits and the Security bit are generally set in the application code.
During end-product manufacturing, the main memory array, GPNVM bits, Lock bits and the Security bit may be set.
The following sequence must be respected when considering setting the security bit either during the development or the production phase:
- Program the main memory array (one or several binary images).
- Program the lock bits (optional).
- Program the GPNVM bits according to the desired Boot mode.
- Program the Security bit.
