
Firewall (FW)
RM0351
142/1830
DocID024597 Rev 5
Below is the initialization procedure to follow:
1.
Configure the RCC to enable the clock to the Firewall module
2. Configure the RCC to enable the clock of the system configuration registers
3. Set the base address and length of each segment (CSSA, CSL, NVDSSA, NVDSL,
VDSSA, VDSL registers)
4. Set the configuration register of the Firewall (FW_CR register)
5. Enable the Firewall clearing the FWDIS bit in the system configuration register.
The Firewall configuration register (FW_CR register) is the only one which can be managed
in a dynamic way even if the Firewall is enabled:
•
when the Non-Volatile data segment is undefined (meaning the NVDSL register is
equal to 0), the accesses to this register are possible whatever the Firewall state
(opened or closed).
•
when the Non-Volatile data segment is defined (meaning the NVDSL register is
different from 0), the accesses to this register are only possible when the Firewall is
opened.
4.3.6 Firewall
states
The Firewall has three different states as shown in
•
Disabled: The FWDIS bit is set by default after the reset. The Firewall is not active.
•
Closed: The Firewall protects the accesses to the three segments (Code, Non-volatile
data, and Volatile data segments).
•
Opened: The Firewall allows access to the protected segments as defined in
Section 4.3.4: Segment accesses and properties
.
Figure 8. Firewall functional states
069
)LUHZDOOGLVDEOH
UHVHW
)LUHZDOO
FORVHG
)LUHZDOO
RSHQHG
(QDEOHWKHILUHZDOO
):',6
µµFDOOJDWH¶¶HQWU\
,OOHJDODFFHVVHVWR
WKHSURWHFWHG
VHJPHQWV
&RGHSURWHFWHGMXPSV
WRXQSURWHFWHG
VHJPHQWV
3URWHFWHGFRGHMXPSV
WRDQXQSURWHFWHG
VHJPHQWDQG)3$