![]() |
nrfx 4.5.0
|
Resistive Random Access Memory Controller (RRAMC) peripheral driver. More...
Data Structures | |
| struct | nrfx_rramc_config_t |
| Configuration structure of the RRAMC driver instance. More... | |
Macros | |
| #define | NRFX_RRAMC_DEFAULT_CONFIG(_write_buff_size) |
| RRAMC driver default configuration. | |
Typedefs | |
| typedef void(* | nrfx_rramc_evt_handler_t) (nrf_rramc_event_t const event_type) |
| RRAMC driver event handler type. | |
Functions | |
| void | nrfx_rramc_all_erase (void) |
| Function for erasing the whole RRAM memory. | |
| void | nrfx_rramc_byte_write (uint32_t address, uint8_t value) |
| Function for writing a single byte to RRAM. | |
| void | nrfx_rramc_bytes_write (uint32_t address, void const *src, uint32_t num_bytes) |
| Function for writing consecutive bytes to RRAM. | |
| void | nrfx_rramc_word_write (uint32_t address, uint32_t value) |
| Function for writing a 32-bit word to RRAM. | |
| void | nrfx_rramc_words_write (uint32_t address, void const *src, uint32_t num_words) |
| Function for writing consecutive 32-bit words to RRAM. | |
| void | nrfx_rramc_write_enable_set (bool enable, uint32_t write_buff_size) |
| Function for enabling write mode and setting size of write buffer. | |
| bool | nrfx_rramc_write_enable_check (void) |
| Function for checking if write mode is enabled. | |
| int | nrfx_rramc_init (nrfx_rramc_config_t const *p_config, nrfx_rramc_evt_handler_t handler) |
| Function for initializing the RRAMC driver instance. | |
| int | nrfx_rramc_reconfigure (nrfx_rramc_config_t const *p_config) |
| Function for reconfiguring the RRAMC driver instance. | |
| void | nrfx_rramc_uninit (void) |
| Function for uninitializing the RRAMC driver instance. | |
| uint32_t | nrfx_rramc_memory_size_get (void) |
| Function for getting the total RRAM size in bytes. | |
| void | nrfx_rramc_write_buffer_commit (void) |
| Function for committing write buffer. | |
| void | nrfx_rramc_wake_up (void) |
| Function for waking up the RRAMC. | |
| bool | nrfx_rramc_write_buffer_empty_check (void) |
| Function for checking if RRAMC write buffer is empty. | |
| NRFX_STATIC_INLINE uint32_t | nrfx_rramc_otp_word_read (uint32_t index) |
| Function for reading a word from the OTP in UICR. | |
| NRFX_STATIC_INLINE bool | nrfx_rramc_otp_word_write (uint32_t index, uint32_t value) |
| Function for writing a 32-bit word at index position to OTP region in UICR. | |
| NRFX_STATIC_INLINE uint8_t | nrfx_rramc_byte_read (uint32_t address) |
| Function for reading a byte from the RRAM. | |
| NRFX_STATIC_INLINE uint32_t | nrfx_rramc_word_read (uint32_t address) |
| Function for reading a 32-bit word from the RRAM. | |
| NRFX_STATIC_INLINE void | nrfx_rramc_buffer_read (void *dst, uint32_t address, uint32_t num_bytes) |
| Function for reading a given number of bytes from the RRAM into the specified buffer. | |
| NRFX_STATIC_INLINE bool | nrfx_rramc_ready_check (void) |
| Function for checking current RRAMC operation status. | |
Resistive Random Access Memory Controller (RRAMC) peripheral driver.
| #define NRFX_RRAMC_DEFAULT_CONFIG | ( | _write_buff_size | ) |
RRAMC driver default configuration.
This configuration sets up RRAMC with the following options:
| [in] | _write_buff_size | Size of write buffer. |
| typedef void(* nrfx_rramc_evt_handler_t) (nrf_rramc_event_t const event_type) |
RRAMC driver event handler type.
| [in] | event_type | RRAMC event. |
| void nrfx_rramc_all_erase | ( | void | ) |
Function for erasing the whole RRAM memory.
| NRFX_STATIC_INLINE void nrfx_rramc_buffer_read | ( | void * | dst, |
| uint32_t | address, | ||
| uint32_t | num_bytes ) |
Function for reading a given number of bytes from the RRAM into the specified buffer.
| [out] | dst | Pointer to the buffer to store the data. |
| [in] | address | Address of the first byte to be read. |
| [in] | num_bytes | Number of bytes to be read. |
| NRFX_STATIC_INLINE uint8_t nrfx_rramc_byte_read | ( | uint32_t | address | ) |
Function for reading a byte from the RRAM.
Use this function in case accessing the RRAM gives the possibility to run the code in an environment where the flash is simulated.
| [in] | address | Address of the byte to be read. |
| void nrfx_rramc_byte_write | ( | uint32_t | address, |
| uint8_t | value ) |
Function for writing a single byte to RRAM.
To determine if the last RRAM write operation has been completed, use nrfx_rramc_ready_check(). The status is not updated during writes to write-buffer.
| [in] | address | Address to where data is to be written. |
| [in] | value | Value to be written. |
| void nrfx_rramc_bytes_write | ( | uint32_t | address, |
| void const * | src, | ||
| uint32_t | num_bytes ) |
Function for writing consecutive bytes to RRAM.
To determine if the last RRAM write operation has been completed, use nrfx_rramc_ready_check(). The status is not updated during writes to write-buffer.
| [in] | address | Address to where data is to be written. |
| [in] | src | Pointer to data to be copied. |
| [in] | num_bytes | Number of bytes to be written. |
| int nrfx_rramc_init | ( | nrfx_rramc_config_t const * | p_config, |
| nrfx_rramc_evt_handler_t | handler ) |
Function for initializing the RRAMC driver instance.
| [in] | p_config | Pointer to the structure containing configuration. |
| [in] | handler | Event handler provided by the user. |
| 0 | Initialization was successful. |
| -EALREADY | The driver has already been initialized. |
| uint32_t nrfx_rramc_memory_size_get | ( | void | ) |
Function for getting the total RRAM size in bytes.
FICR_INFO_RRAM_RRAM_Unspecified value if the total RRAM size cannot be determined based on the FICR data.| NRFX_STATIC_INLINE uint32_t nrfx_rramc_otp_word_read | ( | uint32_t | index | ) |
Function for reading a word from the OTP in UICR.
OTP is a region of the UICR present in some chips. This function must be used to read word data from this region since unaligned accesses are not available on the OTP RRAM area.
| [in] | index | Address (index) in OTP table from which a word is to be read. |
| The | contents at index. |
| NRFX_STATIC_INLINE bool nrfx_rramc_otp_word_write | ( | uint32_t | index, |
| uint32_t | value ) |
Function for writing a 32-bit word at index position to OTP region in UICR.
The OTP can only be written once after each Erase All is performed. This function checks if the value currently residing at the specified index can be transformed to the desired value. If yes, then performs the write operation.
| [in] | index | Address (index) in OTP table to which a word it to be written. |
| [in] | value | Value to be written. |
| true | Word can be written into the specified OTP index address. |
| false | Word cannot be written into the specified OTP index address. Erase UICR or change index address. |
| NRFX_STATIC_INLINE bool nrfx_rramc_ready_check | ( | void | ) |
Function for checking current RRAMC operation status.
The status is updated for all RRAMC operations except during read and writes to write-buffer.
| true | Current operation is completed, and RRAMC is ready. |
| false | RRAMC is busy. |
| int nrfx_rramc_reconfigure | ( | nrfx_rramc_config_t const * | p_config | ) |
Function for reconfiguring the RRAMC driver instance.
| [in] | p_config | Pointer to the structure containing configuration. |
| 0 | Reconfiguration was successful. |
| -EINPROGRESS | The driver is uninitialized. |
| NRFX_STATIC_INLINE uint32_t nrfx_rramc_word_read | ( | uint32_t | address | ) |
Function for reading a 32-bit word from the RRAM.
Use this function in case accessing the RRAM gives the possibility to run the code in an environment where the flash is simulated.
| [in] | address | Address of the word to be read. |
| void nrfx_rramc_word_write | ( | uint32_t | address, |
| uint32_t | value ) |
Function for writing a 32-bit word to RRAM.
To determine if the last RRAM write operation has been completed, use nrfx_rramc_ready_check(). The status is not updated during writes to write-buffer.
| [in] | address | Address to where data is to be written. Must be word-aligned. |
| [in] | value | Value to be written. |
| void nrfx_rramc_words_write | ( | uint32_t | address, |
| void const * | src, | ||
| uint32_t | num_words ) |
Function for writing consecutive 32-bit words to RRAM.
To determine if the last RRAM write operation has been completed, use nrfx_rramc_ready_check(). The status is not updated during writes to write-buffer.
| [in] | address | Address to where data is to be written. Must be word-aligned. |
| [in] | src | Pointer to data to be copied. Must be word-aligned. |
| [in] | num_words | Number of words to be written. |
| bool nrfx_rramc_write_buffer_empty_check | ( | void | ) |
Function for checking if RRAMC write buffer is empty.
| true | Buffer is empty. |
| false | Buffer is not empty. |
| bool nrfx_rramc_write_enable_check | ( | void | ) |
Function for checking if write mode is enabled.
| void nrfx_rramc_write_enable_set | ( | bool | enable, |
| uint32_t | write_buff_size ) |
Function for enabling write mode and setting size of write buffer.
| [in] | enable | True if write mode is to be enabled, false otherwise. |
| [in] | write_buff_size | Size of write buffer. If set to 0, buffering is disabled. |