I want to use nrf SPI driver for SPI flash implementation. For that want to send either SPI transmit or SPI receive at single instance to write or read flash address. But in nrf spi divers , single driver function is available for both transmit and receive...as below,
__STATIC_INLINE ret_code_t nrf_drv_spi_transfer ( nrf_drv_spi_t const *const p_instance,
uint8_t const * p_tx_buffer,
uint8_t tx_buffer_length,
uint8_t * p_rx_buffer,
uint8_t rx_buffer_length
)
For SPI flash write functionality, only transmit functionality require to send address and data, so I defined receiving parameters are NULL herewith. Same reverse thing is apply at the time of receive. But I didn't get proper data when I am trying to read data from flash.
Can you please suggest how should I use this SPI driver for either transmit or receive functionality.
Thanks & Regards,
Pooja Uchagaonkar