![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 22](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630022.webp)
www.geehy.com Page 21
the write operation will be suspended, a programming parallelism error will be
generated, and the PGPRLERR bit will be set to 1.
Programming sequence error
The correct programming sequence is:
Confirm the operation currently not performed to the Flash through
FMC_STS[BUSY]
Set FMC_CTRL[PG] to 1
Conduct write operation
Operation is completed, waiting for BUSY bit to be cleared to zero
If the programming sequence is wrong, a programming sequence error will
occur, and the PGSEQERR bit will be set to 1.
Buffer
If the write operation of Flash involves some data in D-cache, the data in Flash
and D-cache will be modified.
If the erase operation of Flash involves the data in D-cache or I-cache, the data
shall be written to the cache before it.
Interrupt
An interrupt will occur in case of any of the following events:
End of operation: End of erase/write operation
Write protection error: Perform erase/write operation for the write
protection area
Programming error: An error occurs during erase/write/read
When OPCINTEN bit or ERRINTEN bit in FMC_CTRL register is set to 1 and
the corresponding interrupt event occurs, an interrupt will be generated.
Option byte
The address and composition of the option byte are shown in the following
table, and the specific meaning description can be seen in the corresponding bit
of FMC_OPTCTRL register.
Table 11 Instructions for Option Bytes
Address
Bit field
Option byte
Functional description
0x1FFF C000
1:0
-
-
3:2
BORLVL
Brownout reset level
4
-
-
5
WDTSEL
Select the watchdog