GD32W51x User Manual
70
In QSPI mode, fetch data use EXT Flash. Start address is 0x08000000 (non-secure) /
0x0C000000 (secure). Size is 32MB. It can support RTDEC function.
NO- RTDEC function
In FMC mode, for SIP Flash, up to four areas can be configured without RTDEC function by
FMC_NODECx (x=0,1,2,3), even if AESEN bit in
EFUSE_USER_CTL register is set.
Note:
QSPI mode does not support NO-RTDEC function.
Read add offset fuction
In order to meet the needs of Wi-Fi OTA fuction, the read offset function can be configured to
increase the bus initial address by add an offset and then read it from FMC. After setting the
read offset value and area by configuring FMC_OFRG and FMC_OFVR, reading the value of
the source address is equivalent to reading the value of the add offset address.
Both SIP
Flash memory in FMC mode and EXT Flash memory in QSPI mode support this function
when reading form 0x0800 0000 (0x0C00 0000). If user need to configure other functions,
the RTDEC area configuration needs to use the source address, and the secure mark area
configuration uses the offset address.
The setting of the secure mark area has nothing to do
with offset. If user need to add secure mark in the offset area, user need to add mark to add
offset address instead of the source address. For specific settings of secure mark, please
refer to
TrustZone security protection.
Note:
(1) Adding offset area does not support configure into NO-RTDEC area. (2) The offset
function only supports read operation, not support program operation and erase operation.
2.4.3.
Unlock the FMC_CTL/FMC_SECCTL register
After reset, the FMC_CTL/FMC_SECCTL register is not accessible in write mode, and
the LK/SECLK bit in the FMC_CTL/FMC_SECCTL register is reset to 1. An unlocking
sequence consists of two write operations to the FMC_KEY/FMC_SECKE Y register to
open the access to the FMC_CTL/FMC_SECCTL register. The two write operations ar
e writing 0x45670123 and 0xCDEF89AB to the FMC_KEY/FMC_SECKEY register. Afte
r the two write operations, the LK/SECLK bit in the FMC_CTL/FMC_SECCTLregister i
s reset to 0 by hardware. The software can lock the FMC_CTL/FMC_SECCTL again
by setting the LK/SECLK bit in the FMC_CTL/FMC_SECCTL register to 1. Any wrong
operations to the FMC_KEY/FMC_SECKEY, will set the LK/FMC_LK bit to 1, and lock
the FMC_CTL/FMC_SECCTL register, and lead to a bus error.
The OBWEN bit in the FMC_CTL are still protected even the FMC_CTL is unlocked.
The unlocking sequence consists of two write operations, which are writing 0x4567012
3 and 0xCDEF89AB to the FMC_OBKEY register. Then the hardware sets the OBWE
N bit in the FMC_CTL register to 1. The software can reset OBWEN bit to 0 to prote
ct the FMC_SECMCFGx
(x=0,1,2,3)/FMC_NODECx (x=0,1,2,3)/FMC_OFRG/FMC_OFV
R registers .