STM32L486xx HAL User Manual
Defines
FIREWALL Exported Macros
FIREWALL

Defines

#define __HAL_FIREWALL_IS_ENABLED()   HAL_IS_BIT_CLR(SYSCFG->CFGR1, SYSCFG_CFGR1_FWDIS)
 Check whether the FIREWALL is enabled or not.
#define __HAL_FIREWALL_PREARM_ENABLE()
 Enable FIREWALL pre arm.
#define __HAL_FIREWALL_PREARM_DISABLE()
 Disable FIREWALL pre arm.
#define __HAL_FIREWALL_VOLATILEDATA_SHARED_ENABLE()
 Enable volatile data sharing in setting VDS bit.
#define __HAL_FIREWALL_VOLATILEDATA_SHARED_DISABLE()
 Disable volatile data sharing in resetting VDS bit.
#define __HAL_FIREWALL_VOLATILEDATA_EXECUTION_ENABLE()
 Enable volatile data execution in setting VDE bit.
#define __HAL_FIREWALL_VOLATILEDATA_EXECUTION_DISABLE()
 Disable volatile data execution in resetting VDE bit.
#define __HAL_FIREWALL_GET_VOLATILEDATA_SHARED()   ((FIREWALL->CR & FW_CR_VDS) == FW_CR_VDS)
 Check whether or not the volatile data segment is shared.
#define __HAL_FIREWALL_GET_VOLATILEDATA_EXECUTION()   ((FIREWALL->CR & FW_CR_VDE) == FW_CR_VDE)
 Check whether or not the volatile data segment is declared executable.
#define __HAL_FIREWALL_GET_PREARM()   ((FIREWALL->CR & FW_CR_FPA) == FW_CR_FPA)
 Check whether or not the Firewall pre arm bit is set.

Define Documentation

#define __HAL_FIREWALL_GET_PREARM ( )    ((FIREWALL->CR & FW_CR_FPA) == FW_CR_FPA)

Check whether or not the Firewall pre arm bit is set.

Note:
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.
Return values:
FPAbit setting status (TRUE or FALSE).

Definition at line 323 of file stm32l4xx_hal_firewall.h.

#define __HAL_FIREWALL_GET_VOLATILEDATA_EXECUTION ( )    ((FIREWALL->CR & FW_CR_VDE) == FW_CR_VDE)

Check whether or not the volatile data segment is declared executable.

Note:
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.
Return values:
VDEbit setting status (TRUE or FALSE).

Definition at line 313 of file stm32l4xx_hal_firewall.h.

#define __HAL_FIREWALL_GET_VOLATILEDATA_SHARED ( )    ((FIREWALL->CR & FW_CR_VDS) == FW_CR_VDS)

Check whether or not the volatile data segment is shared.

Note:
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.
Return values:
VDSbit setting status (TRUE or FALSE).

Definition at line 303 of file stm32l4xx_hal_firewall.h.

#define __HAL_FIREWALL_IS_ENABLED ( )    HAL_IS_BIT_CLR(SYSCFG->CFGR1, SYSCFG_CFGR1_FWDIS)

Check whether the FIREWALL is enabled or not.

Return values:
FIREWALLenabling status (TRUE or FALSE).

Definition at line 168 of file stm32l4xx_hal_firewall.h.

Referenced by HAL_FIREWALL_Config().

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  CLEAR_BIT(FIREWALL->CR, FW_CR_FPA) ;                         \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_FPA) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Disable FIREWALL pre arm.

Note:
When FPA bit is set, any code executed outside the protected segment closes the Firewall, otherwise, it generates a system reset.
This macro provides the same service as HAL_FIREWALL_DisablePreArmFlag() API but can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 203 of file stm32l4xx_hal_firewall.h.

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  SET_BIT(FIREWALL->CR, FW_CR_FPA) ;                           \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_FPA) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Enable FIREWALL pre arm.

Note:
When FPA bit is set, any code executed outside the protected segment closes the Firewall, otherwise it generates a system reset.
This macro provides the same service as HAL_FIREWALL_EnablePreArmFlag() API but can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 181 of file stm32l4xx_hal_firewall.h.

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  CLEAR_BIT(FIREWALL->CR, FW_CR_VDE) ;                         \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_VDE) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Disable volatile data execution in resetting VDE bit.

Note:
VDE bit is ignored when VDS is set. IF VDS = 1, the Volatile data segment can be executed whatever the VDE bit value.
When VDE bit is reset (with VDS = 0), the volatile data segment cannot be executed.
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 284 of file stm32l4xx_hal_firewall.h.

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  SET_BIT(FIREWALL->CR, FW_CR_VDE) ;                           \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_VDE) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Enable volatile data execution in setting VDE bit.

Note:
VDE bit is ignored when VDS is set. IF VDS = 1, the Volatile data segment can be executed whatever the VDE bit value.
When VDE bit is set (with VDS = 0), the volatile data segment is executable. When the Firewall call is closed, a "call gate" entry procedure is required to open first the Firewall.
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 264 of file stm32l4xx_hal_firewall.h.

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  CLEAR_BIT(FIREWALL->CR, FW_CR_VDS) ;                         \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_VDS) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Disable volatile data sharing in resetting VDS bit.

Note:
When VDS bit is reset, the volatile data segment is not shared and cannot be hit by a non protected executable code when the Firewall is closed. If it is accessed in such a condition, a system reset is generated by the Firewall.
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 242 of file stm32l4xx_hal_firewall.h.

Value:
do {                                                              \
                  __IO uint32_t tmpreg;                                        \
                  SET_BIT(FIREWALL->CR, FW_CR_VDS) ;                           \
                  /* Read bit back to ensure it is taken into account by IP */ \
                  /* (introduce proper delay inside macro execution) */        \
                  tmpreg = READ_BIT(FIREWALL->CR, FW_CR_VDS) ;                 \
                  UNUSED(tmpreg);                                              \
                } while(0)

Enable volatile data sharing in setting VDS bit.

Note:
When VDS bit is set, the volatile data segment is shared with non-protected application code. It can be accessed whatever the Firewall state (opened or closed).
This macro can be executed inside a code area protected by the Firewall.
This macro can be executed whatever the Firewall state (opened or closed) when NVDSL register is equal to 0. Otherwise (when NVDSL register is different from 0, that is, when the non volatile data segment is defined), the macro can be executed only when the Firewall is opened.

Definition at line 222 of file stm32l4xx_hal_firewall.h.