nRF5 SDK v17.1.0
Enumerations | Functions
MWU HAL

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

MWU events.

Enumerator
NRF_MWU_EVENT_REGION0_WRITE 

Write access to region 0 detected.

NRF_MWU_EVENT_REGION0_READ 

Read access to region 0 detected.

NRF_MWU_EVENT_REGION1_WRITE 

Write access to region 1 detected.

NRF_MWU_EVENT_REGION1_READ 

Read access to region 1 detected.

NRF_MWU_EVENT_REGION2_WRITE 

Write access to region 2 detected.

NRF_MWU_EVENT_REGION2_READ 

Read access to region 2 detected.

NRF_MWU_EVENT_REGION3_WRITE 

Write access to region 3 detected.

NRF_MWU_EVENT_REGION3_READ 

Read access to region 3 detected.

NRF_MWU_EVENT_PREGION0_WRITE 

Write access to peripheral region 0 detected.

NRF_MWU_EVENT_PREGION0_READ 

Read access to peripheral region 0 detected.

NRF_MWU_EVENT_PREGION1_WRITE 

Write access to peripheral region 1 detected.

NRF_MWU_EVENT_PREGION1_READ 

Read access to peripheral region 1 detected.

MWU interrupt masks.

Enumerator
NRF_MWU_INT_REGION0_WRITE_MASK 

Interrupt on REGION[0].WA event.

NRF_MWU_INT_REGION0_READ_MASK 

Interrupt on REGION[0].RA event.

NRF_MWU_INT_REGION1_WRITE_MASK 

Interrupt on REGION[1].WA event.

NRF_MWU_INT_REGION1_READ_MASK 

Interrupt on REGION[1].RA event.

NRF_MWU_INT_REGION2_WRITE_MASK 

Interrupt on REGION[2].WA event.

NRF_MWU_INT_REGION2_READ_MASK 

Interrupt on REGION[2].RA event.

NRF_MWU_INT_REGION3_WRITE_MASK 

Interrupt on REGION[3].WA event.

NRF_MWU_INT_REGION3_READ_MASK 

Interrupt on REGION[3].RA event.

NRF_MWU_INT_PREGION0_WRITE_MASK 

Interrupt on PREGION[0].WA event.

NRF_MWU_INT_PREGION0_READ_MASK 

Interrupt on PREGION[0].RA event.

NRF_MWU_INT_PREGION1_WRITE_MASK 

Interrupt on PREGION[1].WA event.

NRF_MWU_INT_PREGION1_READ_MASK 

Interrupt on PREGION[1].RA event.

MWU region watch masks.

Enumerator
NRF_MWU_WATCH_REGION0_WRITE 

Region 0 write access watch mask.

NRF_MWU_WATCH_REGION0_READ 

Region 0 read access watch mask.

NRF_MWU_WATCH_REGION1_WRITE 

Region 1 write access watch mask.

NRF_MWU_WATCH_REGION1_READ 

Region 1 read access watch mask.

NRF_MWU_WATCH_REGION2_WRITE 

Region 2 write access watch mask.

NRF_MWU_WATCH_REGION2_READ 

Region 2 read access watch mask.

NRF_MWU_WATCH_REGION3_WRITE 

Region 3 write access watch mask.

NRF_MWU_WATCH_REGION3_READ 

Region 3 read access watch mask.

NRF_MWU_WATCH_PREGION0_WRITE 

Peripheral region 0 write access watch mask.

NRF_MWU_WATCH_PREGION0_READ 

Peripheral region 0 read access watch mask.

NRF_MWU_WATCH_PREGION1_WRITE 

Peripheral region 1 write access watch mask.

NRF_MWU_WATCH_PREGION1_READ 

Peripheral region 1 read access watch mask.

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_regPointer to the structure of registers of the peripheral.
[in]eventRequested 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_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe 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_regPointer to the structure of registers of the peripheral.
[in]eventEvent 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_regPointer to the structure of registers of the peripheral.
[in]int_maskInterrupts 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_regPointer to the structure of registers of the peripheral.
[in]int_maskInterrupts 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_regPointer to the structure of registers of the peripheral.
[in]mwu_intInterrupt to be checked.
Return values
trueThe interrupt is enabled.
falseThe 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_regPointer to the structure of registers of the peripheral.
[in]int_maskInterrupts 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_regPointer to the structure of registers of the peripheral.
[in]int_maskInterrupts 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_regPointer to the structure of registers of the peripheral.
[in]mwu_intInterrupt to be checked.
Return values
trueThe interrupt is enabled.
falseThe 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_regPointer to the structure of registers of the peripheral.
[in]reg_watch_maskMask 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_regPointer to the structure of registers of the peripheral.
[in]reg_watch_maskMask 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_regPointer 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_regPointer to the structure of registers of the peripheral.
[in]per_reg_idxPeripheral region containing specified subregions.
[in]subregion_maskMask 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_regPointer to the structure of registers of the peripheral.
[in]per_reg_idxPeripheral region containing subregion accesses to clear.
[in]subregion_maskMask 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_regPointer to the structure of registers of the peripheral.
[in]per_reg_idxPeripheral 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_regPointer to the structure of registers of the peripheral.
[in]per_reg_idxPeripheral region containing subregion accesses to clear.
[in]subregion_maskMask 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_regPointer to the structure of registers of the peripheral.
[in]per_reg_idxPeripheral 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_regPointer to the structure of registers of the peripheral.
[in]region_idxRegion number to configure.
[in]start_addrMemory address defining the beginning of the region.
[in]end_addrMemory address defining the end of the region.

Documentation feedback | Developer Zone | Subscribe | Updated