![ARTERY AT32WB415 Series Скачать руководство пользователя страница 68](http://html1.mh-extra.com/html/artery/at32wb415-series/at32wb415-series_reference-manual_2977599068.webp)
AT32WB415
Series Reference Manual
2022.04.13
Page 68
Ver 2.00
Figure 5-4
System data area erase process
Start
No
Check the OBF bit in FLASH_STS
OBF = 0?
Yes
Set USDERS = 1 and ERSTR =1
in FLASH_CTRL
OBF = 0 ?
Check the OBF bit in FLASH_STS
Read ODF bit in FLASH_STS
No
Yes
End
5.4.3
Programming operation
The User system data area can be programmed with 16 bits or 32 bits at a time.
The following process is recommended:
Check the OBF bit in the FLASH_STS register to confirm that there is no other programming
operation in progress;
Set the USDPRGM bit in the FLASH_CTRL register, so that the programming instructions for the
user system data area can be received;
Write the data (half-word/word) to be programmed to the designated address;
Wait until the OBF bit in the FLASH_STS register becomes “0”, read the PRGMERR and ODF bit
to verify the programming result.
Note: Read operation to the Flash memory during programming halts CPU and waits until the
completion of programming. The internal HICK must be enabled prior to programming
operation.