Hi Nordic,
Currently I am using the nRF5_SDK_15.2.0_9412b96 to develop SPI interface with a sensor using SPIM for nRF52832.
Within the spim_xfer(NRF_SPIM_Type * p_spim, spim_control_block_t * p_cb, nrfx_spim_xfer_desc_t const * p_xfer_desc, uint32_t flags) function, I can see that the code is setting up the TX and RX buffer of the SPIM as below:
nrf_spim_tx_buffer_set(p_spim, p_xfer_desc->p_tx_buffer, p_xfer_desc->tx_length);
nrf_spim_rx_buffer_set(p_spim, p_xfer_desc->p_rx_buffer, p_xfer_desc->rx_length);
The issue that I am seeing is that it takes a long period of 2us (measured on oscilloscope) to execute the set up the TX and RX buffer.
Why does it takes so long time and what can I do to reduce it?
From the time my SS pin is pulled low to first TX SCK comes out, this delay of 2us is always there. I would like to reduce this to a minimum for my application to work in optimised state.
Please help!
Thanks