GD32W51x User Manual
729
22.5.
QSPI configuration
22.5.1.
Flash configuration
The configuration in QSPI_DCFG register can be used to specify the characteristics of the
external flash memory, so that the QSPI interface can work consistently.
FMSZ field defines the size of the external memory, FMSZ + 1 is the number of address bits
in the flash memory. The maximum of the flash capacity can be up to 4GB in indirect mode.
CSHC field defines the chip select high time, it specify the minimum number of SCK cycles
that CSN must stay high between two command sequences.
22.5.2.
QSPI IP configuration
The configuration in QSPI_TCFG register can be used to specify the characteristics of the
QSPI IP.
PSC field indicate the clock prescaler division factor.
SSAMPLE indicate which SCK edge is used to sample data. By default, the QSPI sample
data one half of a SCK cycle after the external flash drives. However, it may be beneficial to
sample data later because of the external signal delays. The sample edge can be shifted half
one of SCK cycle using SSAMPLE bit.
DMAEN bit enables the DMA requests, which is generated according to FIFO level and FTL
bits.
22.6.
Security description
If there are option bytes, the global TrustZone system security is activated by setting the
TZEN bit in FMC_OBR register. If there are no option bytes, the global TrustZone system
security is activated by setting the TZEN bit in EFUSE_TZCTL register.
FMC QSPI mode read by FMC (FMC
is the bus interface of the flash memory controller) or
QSPI interface and program/erase by QSPI interface.Firstly it will judge the AHB addr[31:28],
if addr[31:28] is 4 or 5, then the address will be a register address, otherwise the address will
be a memory address when it is 9.Then if the address belongs to the register address range,
QSPI will distinguish the register direction through the hnonsec signal and register property.
Aimmg at the register address of QSPI_ADDR, QSPI will judge
it’s accessable through
securemarked area partition.
If the address belongs to the memory address range, then QSPI directly judge the accessable
of AHB addr through securemarked area partition.
Table 22-3.
Flash secure/non-secure and privileged/unprivileged operation under