![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 34](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782034.webp)
GD32A50x User Manual
34
event is detected, a NMI interrupt will be generated.
1.3.2.
On-chip Flash memory
The devices provide high-density on-chip flash memory, which is structured as follows:
Up to 384KB of main Flash memory.
Up to 18KB of information blocks for the boot loader.
Option bytes to configure the device
1.4.
Boot configuration
The GD32A50x
series
provide three kinds of boot sources which can be selected by the
BOOT0 and BOOT1 pins. The details are shown in the following table. The value on the two
pins is latched on the 4th rising edge of CK_SYS after a reset. It is up to the user to set the
BOOT0 and BOOT1 pins after a power-on reset or a system reset to select the required boot
source. Once the two pins have been sampled, they are free and can be used for other
purposes.
Table 1-3. Boot modes
Selected boot source
Boot mode selection pins
Boot1
Boot0
Main Flash Memory
x
0
System Memory
0
1
On-chip SRAM
1
1
After power-on sequence or a system reset, the Arm
®
Cortex
®
-M33 processor fetches the top-
of-stack value from address 0x0000 0000 and the base address of boot code from 0x0000
0004 in sequence. Then, it starts executing code from the base address of boot code.
According to the selected boot source, either the main flash memory (original memory space
beginning at 0x0800 0000) or the system memory (original memory space beginning at
0x1FFF D000) is aliased in the boot memory space which begins at the address 0x0000 0000.
When the on-chip SRAM whose memory space is beginning at 0x2000 0000 is selected as
the boot source, in the application initialization code, you have to relocate the vector table in
SRAM using the NVIC exception table and offset register.
The embedded boot loader is located in the System memory, which is used to reprogram the
Flash memory. The boot loader can be activated through one of the following interfaces:
USART0 (PA10 and PA11), LIN (PA3 and PA4), and CAN0 (PB13 and PB14).