RAMC HAL

group nrf_ramc_hal

Hardware access layer for managing the Random Access Memory Controller (RAMC) peripheral.

Enums

enum nrf_ramc_event_t

RAMC events.

Values:

enumerator NRF_RAMC_EVENT_ERROR_FIXABLE

ECC detected fixable (one bit) error in read data from RAM.

enumerator NRF_RAMC_EVENT_ERROR_NON_FIXABLE

ECC detected non-fixable (multiple bits) error in read data from RAM.

Functions

NRF_STATIC_INLINE void nrf_ramc_event_clear(NRF_RAMC_Type *p_reg, nrf_ramc_event_t event)

Function for clearing the specified RAMC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be cleared.

NRF_STATIC_INLINE bool nrf_ramc_event_check(NRF_RAMC_Type const *p_reg, nrf_ramc_event_t event)

Function for retrieving the state of the RAMC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be checked.

Return values:
  • true – The event has been generated.

  • false – The event has not been generated.

NRF_STATIC_INLINE uint32_t nrf_ramc_event_address_get(NRF_RAMC_Type const *p_reg, nrf_ramc_event_t event)

Function for returning the address of the specified RAMC event register.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] The specified event.

Returns:

Address of specified event register.

NRF_STATIC_INLINE void nrf_ramc_waitstates_set(NRF_RAMC_Type *p_reg, uint8_t waitstates)

Function for setting number of waitstates for a read from the RAM.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • waitstates[in] Number of waitstates [0…1].

NRF_STATIC_INLINE uint8_t nrf_ramc_waitstates_get(NRF_RAMC_Type const *p_reg)

Function for getting number of waitstates for a read from the RAM.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Number of waitstates.

NRF_STATIC_INLINE void nrf_ramc_secbase_set(NRF_RAMC_Type *p_reg, uint32_t addr)

Function for setting base address for secure access area.

Note

When the SECENABLE is enabled, any non-secure accesses to the address within the RAM which are above or equal to the base address generates an error.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • addr[in] Base address. Writes to the bits [11:0] are ignored and are read as zero. Similarly, the MSB size depends on the size of the RAM, writes to those MSB above the size are ignored and are read as zero.

NRF_STATIC_INLINE uint32_t nrf_ramc_secbase_get(NRF_RAMC_Type const *p_reg)

Function for getting base address for secure access area.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Base address.

NRF_STATIC_INLINE void nrf_ramc_secenable_set(NRF_RAMC_Type *p_reg, bool enable)

Function for setting secure access restrictions.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • enable[in] True if secure access restrictions are to be enabled, false otherwise

NRF_STATIC_INLINE bool nrf_ramc_secenable_check(NRF_RAMC_Type const *p_reg)

Function for checking secure access restrictions.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Return values:
  • true – Secure access restrictions are enabled.

  • false – Secure access restrictions are disabled.