Hi everyone,
I am following the qspi example to communicate with MX25R6435F flash memory. This is my first time interacting with a flash memory and I have some questions regarding writting the flash memory
According to the example, to write the flash the following function is used
* @param[in] p_tx_buffer Pointer to the writing buffer.
* @param[in] tx_buffer_length Size of the data to write.
* @param[in] dst_address Address in memory to write to.
*
* @retval NRFX_SUCCESS The operation was successful (blocking mode) or operation
* was commissioned (handler mode).
* @retval NRFX_ERROR_BUSY The driver currently handles other operation.
* @retval NRFX_ERROR_INVALID_ADDR The provided buffer is not placed in the Data RAM region
* or its address is not aligned to a 32-bit word.
*/
nrfx_err_t nrfx_qspi_write(void const * p_tx_buffer,
size_t tx_buffer_length,
uint32_t dst_address);
So, I want to store the data from an IMU and the payload is 38 bytes. So in order to write the first 38bytes:
nrf_drv_qspi_write(m_buffer_tx, QSPI_TEST_DATA_SIZE, 0);
The next 38bytes
nrf_drv_qspi_write(m_buffer_tx, QSPI_TEST_DATA_SIZE, 0x26);
The next 38bytes
nrf_drv_qspi_write(m_buffer_tx, QSPI_TEST_DATA_SIZE, 0x4C);
and so on.. Is this correct?
Is it correct to set the QSPI_TEST_DATA_SIZE equals to 38 or it should be 256?
In general I have to always keep track of the current memory segment that is written right?
What is happening when flash is full? I have to erase memory block before write new data or I can just overwrite the existing?
Is there any example with a filling system using MX25R6435F and QSPI?
Thanks in advance
Nick