![GigaDevice Semiconductor GD32F20 Series Скачать руководство пользователя страница 51](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801051.webp)
GD32F20x User Manual
51
FMC_CTL0 register.
Wait until all the operations have been finished by checking the value of the BUSY bit in
FMC_STAT0 register.
Read and verify the Flash memory by using a DBUS access if required.
When the operation is executed successful, the ENDF in FMC_STAT0 register is set, and an
interrupt will be triggered by FMC if the ENDIE bit in the FMC_CTL0 register is set.
2.3.8.
Option bytes modify
The FMC provides an erase and then program function which is used to modify the option
bytes block in flash. There are 8 pairs of option bytes. The MSB is the complement of the LSB
in each pair. And when the option bytes are modified, the MSB is generated by FMC
automatically, not the value of input data. The following steps show the erase sequence.
Unlock the FMC_CTL0 register if necessary.
Check the BUSY bit in FMC_STAT0 register to confirm that no Flash memory operation
is in progress (BUSY equals to 0). Otherwise, wait until the operation has finished.
Unlock the option bytes operation bits in FMC_CTL0 register if necessary.
Wait until OBWEN bit is set in FMC_CTL0 register
Set the OBPG bit in FMC_CTL0 register.
A 32-bit word/16-bit half word write at desired address by DBUS.
Wait until all the operations have been finished by checking the value of the BUSY bit in
FMC_STAT0 register.
Read and verify the Flash memory by using a DBUS access if required.
When the operation is executed successfully, the ENDF in FMC_STAT0 register is set, and
an interrupt will be triggered by FMC if the ENDIE bit in the FMC_CTL0 register is set. Note
that the word/half word programming operation needs to check whether the address has been
erased or not. If the address has not been erased, PGERR bit in the FMC_STAT0 register
will set when program the address except programming 0x0.
The modified option bytes only take effect after a system reset is generated.
2.3.9.
Option bytes description
The option bytes block is reloaded to FMC_OBSTAT and FMC_WP registers after each
system reset, and the option bytes take effect. The complement option bytes are the opposite
of option bytes. When option bytes reload, if the complement option byte and option byte do
not match, the OBERR bit in FMC_OBSTAT register is set, and the option byte is set to 0xFF.
The OBERR bit is not set if both the option byte and its complement byte are 0xFF.The
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...