![GigaDevice Semiconductor GD32F20 Series Скачать руководство пользователя страница 46](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801046.webp)
GD32F20x User Manual
46
For the GD32F20x_CL with flash more than 512KB, the FMC_CTL0 register is used to
configure the operations to bank0 and the option bytes block, while FMC_CTL1 register is
used to configure the program and erase operations to bank1. The lock/unlock mechanism of
FMC_CTL1 register is similar to FMC_CTL0 register. The unlock sequence should be written
to FMC_KEY1 when unlocking FMC_CTL1.
2.3.4.
Page erase
The FMC provides a page erase function which is used to initialize the contents of a main
flash memory page to a high state. Each page can be erased independently without affecting
the contents of other pages. The following steps show the access sequence of the registers
for a page erase operation.
Unlock the FMC_CTLx registers if necessary.
Check the BUSY bit in FMC_STATx registers to confirm that no flash memory operation
is in progress (BUSY equals to 0). Otherwise, wait until the operation has finished.
Set the PER bit in FMC_CTLx registers.
Write the page absolute address (0x08XX XXXX) into the FMC_ADDRx registers.
Send the page erase command to the FMC by setting the START bit in FMC_CTLx
registers.
Wait until all the operations have finished by checking the value of the BUSY bit in
FMC_STATx registers.
Read and verify the page by using a DBUS access if required.
When the operation is executed successfully, the ENDF in FMC_STATx registers is set, and
an interrupt will be triggered by FMC if the ENDIE bit in the FMC_CTLx registers is set. Note
that a correct target page address must be confirmed. Or the software may run out of control
if the target erase page is being used to fetch codes or to access data. The FMC will not
provide any notification when this occurs. Additionally, the page erase operation will be
ignored on erase/program protected pages. In this condition, a flash operation error interrupt
will be triggered by the FMC if the ERRIE bit in the FMC_CTLx registers is set. The software
can check the WPERR bit in the FMC_STATx registers to detect this condition in the interrupt
Figure 2-1. Process of page erase operation
erase operation flow.
Содержание 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 ...