Hardware access layer for managing the Memory Watch Unit (MWU) peripheral. More...
Enumerations |
|
| enum |
nrf_mwu_event_t
{
NRF_MWU_EVENT_REGION0_WRITE = offsetof(NRF_MWU_Type, EVENTS_REGION[0].WA), NRF_MWU_EVENT_REGION0_READ = offsetof(NRF_MWU_Type, EVENTS_REGION[0].RA), NRF_MWU_EVENT_REGION1_WRITE = offsetof(NRF_MWU_Type, EVENTS_REGION[1].WA), NRF_MWU_EVENT_REGION1_READ = offsetof(NRF_MWU_Type, EVENTS_REGION[1].RA), NRF_MWU_EVENT_REGION2_WRITE = offsetof(NRF_MWU_Type, EVENTS_REGION[2].WA), NRF_MWU_EVENT_REGION2_READ = offsetof(NRF_MWU_Type, EVENTS_REGION[2].RA), NRF_MWU_EVENT_REGION3_WRITE = offsetof(NRF_MWU_Type, EVENTS_REGION[3].WA), NRF_MWU_EVENT_REGION3_READ = offsetof(NRF_MWU_Type, EVENTS_REGION[3].RA), NRF_MWU_EVENT_PREGION0_WRITE = offsetof(NRF_MWU_Type, EVENTS_PREGION[0].WA), NRF_MWU_EVENT_PREGION0_READ = offsetof(NRF_MWU_Type, EVENTS_PREGION[0].RA), NRF_MWU_EVENT_PREGION1_WRITE = offsetof(NRF_MWU_Type, EVENTS_PREGION[1].WA), NRF_MWU_EVENT_PREGION1_READ = offsetof(NRF_MWU_Type, EVENTS_PREGION[1].RA) } |
|
MWU events.
More...
|
|
| enum |
nrf_mwu_int_mask_t
{
NRF_MWU_INT_REGION0_WRITE_MASK = MWU_INTEN_REGION0WA_Msk, NRF_MWU_INT_REGION0_READ_MASK = MWU_INTEN_REGION0RA_Msk, NRF_MWU_INT_REGION1_WRITE_MASK = MWU_INTEN_REGION1WA_Msk, NRF_MWU_INT_REGION1_READ_MASK = MWU_INTEN_REGION1RA_Msk, NRF_MWU_INT_REGION2_WRITE_MASK = MWU_INTEN_REGION2WA_Msk, NRF_MWU_INT_REGION2_READ_MASK = MWU_INTEN_REGION2RA_Msk, NRF_MWU_INT_REGION3_WRITE_MASK = MWU_INTEN_REGION3WA_Msk, NRF_MWU_INT_REGION3_READ_MASK = MWU_INTEN_REGION3RA_Msk, NRF_MWU_INT_PREGION0_WRITE_MASK = MWU_INTEN_PREGION0WA_Msk, NRF_MWU_INT_PREGION0_READ_MASK = MWU_INTEN_PREGION0RA_Msk, NRF_MWU_INT_PREGION1_WRITE_MASK = MWU_INTEN_PREGION1WA_Msk, NRF_MWU_INT_PREGION1_READ_MASK = MWU_INTEN_PREGION1RA_Msk } |
|
MWU interrupt masks.
More...
|
|
| enum |
nrf_mwu_region_watch_t
{
NRF_MWU_WATCH_REGION0_WRITE = MWU_REGIONEN_RGN0WA_Msk, NRF_MWU_WATCH_REGION0_READ = MWU_REGIONEN_RGN0RA_Msk, NRF_MWU_WATCH_REGION1_WRITE = MWU_REGIONEN_RGN1WA_Msk, NRF_MWU_WATCH_REGION1_READ = MWU_REGIONEN_RGN1RA_Msk, NRF_MWU_WATCH_REGION2_WRITE = MWU_REGIONEN_RGN2WA_Msk, NRF_MWU_WATCH_REGION2_READ = MWU_REGIONEN_RGN2RA_Msk, NRF_MWU_WATCH_REGION3_WRITE = MWU_REGIONEN_RGN3WA_Msk, NRF_MWU_WATCH_REGION3_READ = MWU_REGIONEN_RGN3RA_Msk, NRF_MWU_WATCH_PREGION0_WRITE = MWU_REGIONEN_PRGN0WA_Msk, NRF_MWU_WATCH_PREGION0_READ = MWU_REGIONEN_PRGN0RA_Msk, NRF_MWU_WATCH_PREGION1_WRITE = MWU_REGIONEN_PRGN1WA_Msk, NRF_MWU_WATCH_PREGION1_READ = MWU_REGIONEN_PRGN1RA_Msk } |
|
MWU region watch masks.
More...
|
|
Functions |
|
| __STATIC_INLINE bool | nrf_mwu_event_check (NRF_MWU_Type const *p_reg, nrf_mwu_event_t event) |
|
Function for retrieving the state of the MWU event.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_event_clear (NRF_MWU_Type *p_reg, nrf_mwu_event_t event) |
|
Function for clearing a specific MWU event.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_mwu_event_address_get (NRF_MWU_Type const *p_reg, nrf_mwu_event_t event) |
|
Function for getting the address of a specific MWU event register.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_int_enable (NRF_MWU_Type *p_reg, uint32_t int_mask) |
|
Function for enabling specified interrupts.
More...
|
|
| __STATIC_INLINE bool | nrf_mwu_int_enable_check (NRF_MWU_Type const *p_reg, nrf_mwu_int_mask_t mwu_int) |
|
Function for retrieving the state of a specific interrupt.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_int_disable (NRF_MWU_Type *p_reg, uint32_t int_mask) |
|
Function for disabling specified interrupts.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_nmi_enable (NRF_MWU_Type *p_reg, uint32_t int_mask) |
|
Function for enabling specified non-maskable interrupts.
More...
|
|
| __STATIC_INLINE bool | nrf_mwu_nmi_enable_check (NRF_MWU_Type const *p_reg, nrf_mwu_int_mask_t mwu_int) |
|
Function for retrieving the state of a specific non-maskable interrupt.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_nmi_disable (NRF_MWU_Type *p_reg, uint32_t int_mask) |
|
Function for disabling specified non-maskable interrupts.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_user_region_range_set (NRF_MWU_Type *p_reg, uint8_t region_idx, uint32_t start_addr, uint32_t end_addr) |
|
Function for setting address range of the specified user region.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_region_watch_enable (NRF_MWU_Type *p_reg, uint32_t reg_watch_mask) |
|
Function for enabling memory access watch mechanism.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_region_watch_disable (NRF_MWU_Type *p_reg, uint32_t reg_watch_mask) |
|
Function for disabling memory access watch mechanism.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_mwu_region_watch_get (NRF_MWU_Type const *p_reg) |
|
Function for getting memory access watch configuration mask.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_subregions_configure (NRF_MWU_Type *p_reg, uint8_t per_reg_idx, uint32_t subregion_mask) |
|
Function for configuring peripheral subregions for watching.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_mwu_subregions_write_accesses_get (NRF_MWU_Type const *p_reg, uint8_t per_reg_idx) |
|
Function for getting the mask of the write access flags of peripheral subregions.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_subregions_write_accesses_clear (NRF_MWU_Type *p_reg, uint8_t per_reg_idx, uint32_t subregion_mask) |
|
Function for clearing write access flags of peripheral subregions.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_mwu_subregions_read_accesses_get (NRF_MWU_Type const *p_reg, uint8_t per_reg_idx) |
|
Function for getting the mask of the read access flags of peripheral subregions.
More...
|
|
| __STATIC_INLINE void | nrf_mwu_subregions_read_accesses_clear (NRF_MWU_Type *p_reg, uint8_t per_reg_idx, uint32_t subregion_mask) |
|
Function for clearing read access flags of peripheral subregions.
More...
|
|
Detailed Description
Hardware access layer for managing the Memory Watch Unit (MWU) peripheral.
Enumeration Type Documentation
| enum nrf_mwu_event_t |
MWU events.
| enum nrf_mwu_int_mask_t |
MWU interrupt masks.
MWU region watch masks.
Function Documentation
| __STATIC_INLINE uint32_t nrf_mwu_event_address_get | ( | NRF_MWU_Type const * | p_reg , |
| nrf_mwu_event_t | event | ||
| ) |
Function for getting the address of a specific MWU event register.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] event Requested event.
- Returns
- Address of the specified event register.
| __STATIC_INLINE bool nrf_mwu_event_check | ( | NRF_MWU_Type const * | p_reg , |
| nrf_mwu_event_t | event | ||
| ) |
Function for retrieving the state of the MWU event.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] event Event to be checked.
- Return values
-
true The event has been generated. false The event has not been generated.
| __STATIC_INLINE void nrf_mwu_event_clear | ( | NRF_MWU_Type * | p_reg , |
| nrf_mwu_event_t | event | ||
| ) |
Function for clearing a specific MWU event.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] event Event to clear.
| __STATIC_INLINE void nrf_mwu_int_disable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | int_mask | ||
| ) |
Function for disabling specified interrupts.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] int_mask Interrupts to be disabled.
| __STATIC_INLINE void nrf_mwu_int_enable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | int_mask | ||
| ) |
Function for enabling specified interrupts.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] int_mask Interrupts to be enabled.
| __STATIC_INLINE bool nrf_mwu_int_enable_check | ( | NRF_MWU_Type const * | p_reg , |
| nrf_mwu_int_mask_t | mwu_int | ||
| ) |
Function for retrieving the state of a specific interrupt.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] mwu_int Interrupt to be checked.
- Return values
-
true The interrupt is enabled. false The interrupt is not enabled.
| __STATIC_INLINE void nrf_mwu_nmi_disable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | int_mask | ||
| ) |
Function for disabling specified non-maskable interrupts.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] int_mask Interrupts to be disabled.
| __STATIC_INLINE void nrf_mwu_nmi_enable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | int_mask | ||
| ) |
Function for enabling specified non-maskable interrupts.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] int_mask Interrupts to be enabled.
| __STATIC_INLINE bool nrf_mwu_nmi_enable_check | ( | NRF_MWU_Type const * | p_reg , |
| nrf_mwu_int_mask_t | mwu_int | ||
| ) |
Function for retrieving the state of a specific non-maskable interrupt.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] mwu_int Interrupt to be checked.
- Return values
-
true The interrupt is enabled. false The interrupt is not enabled.
| __STATIC_INLINE void nrf_mwu_region_watch_disable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | reg_watch_mask | ||
| ) |
Function for disabling memory access watch mechanism.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] reg_watch_mask Mask that defines regions and access types to stop watching. Compose this mask from nrf_mwu_region_watch_t values.
| __STATIC_INLINE void nrf_mwu_region_watch_enable | ( | NRF_MWU_Type * | p_reg , |
| uint32_t | reg_watch_mask | ||
| ) |
Function for enabling memory access watch mechanism.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] reg_watch_mask Mask that defines regions and access types to watch. Compose this mask from nrf_mwu_region_watch_t values.
| __STATIC_INLINE uint32_t nrf_mwu_region_watch_get | ( | NRF_MWU_Type const * | p_reg | ) |
Function for getting memory access watch configuration mask.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral.
- Returns
- Mask that defines regions and access types being watched.
| __STATIC_INLINE void nrf_mwu_subregions_configure | ( | NRF_MWU_Type * | p_reg , |
| uint8_t | per_reg_idx , | ||
| uint32_t | subregion_mask | ||
| ) |
Function for configuring peripheral subregions for watching.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] per_reg_idx Peripheral region containing specified subregions. [in] subregion_mask Mask that defines subregions to include into the specified peripheral region.
| __STATIC_INLINE void nrf_mwu_subregions_read_accesses_clear | ( | NRF_MWU_Type * | p_reg , |
| uint8_t | per_reg_idx , | ||
| uint32_t | subregion_mask | ||
| ) |
Function for clearing read access flags of peripheral subregions.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] per_reg_idx Peripheral region containing subregion accesses to clear. [in] subregion_mask Mask that defines subregion read accesses to clear.
| __STATIC_INLINE uint32_t nrf_mwu_subregions_read_accesses_get | ( | NRF_MWU_Type const * | p_reg , |
| uint8_t | per_reg_idx | ||
| ) |
Function for getting the mask of the read access flags of peripheral subregions.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] per_reg_idx Peripheral region containing subregions to be checked.
- Returns
- Mask specifying subregions that were read accessed.
| __STATIC_INLINE void nrf_mwu_subregions_write_accesses_clear | ( | NRF_MWU_Type * | p_reg , |
| uint8_t | per_reg_idx , | ||
| uint32_t | subregion_mask | ||
| ) |
Function for clearing write access flags of peripheral subregions.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] per_reg_idx Peripheral region containing subregion accesses to clear. [in] subregion_mask Mask that defines subregion write accesses to clear.
| __STATIC_INLINE uint32_t nrf_mwu_subregions_write_accesses_get | ( | NRF_MWU_Type const * | p_reg , |
| uint8_t | per_reg_idx | ||
| ) |
Function for getting the mask of the write access flags of peripheral subregions.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] per_reg_idx Peripheral region containing subregions to be checked.
- Returns
- Mask specifying subregions that were write accessed.
| __STATIC_INLINE void nrf_mwu_user_region_range_set | ( | NRF_MWU_Type * | p_reg , |
| uint8_t | region_idx , | ||
| uint32_t | start_addr , | ||
| uint32_t | end_addr | ||
| ) |
Function for setting address range of the specified user region.
- Parameters
-
[in] p_reg Pointer to the structure of registers of the peripheral. [in] region_idx Region number to configure. [in] start_addr Memory address defining the beginning of the region. [in] end_addr Memory address defining the end of the region.