Hi,
I need to send more than 256 bytes by SPI using the nrf_drv_spi_transfer() function.In this case is for programming or reading a 256 bytes page in a SPI Flash chip. In the same transmission (I mean the packet of bytes maintaining the CS low) I have to send the 4 bytes of control (1 byte of command+3 bytes of address) followed by the 256 bytes to program or read.
I am using the nRF5_SDK_17.1.0 with the SES IDE environment.
I have understood from the case https://devzone.nordicsemi.com/f/nordic-q-a/16580/send-more-than-255-bytes-by-spi-nrf52 that the DMA is limited to 256 bytes in the nRF52832. And I'm obliged to use this chip.
So, for sending a packet of more than 256 bytes this would mean that I should execute more than one nrf_drv_spi_transfer() function but maintaining the SS pin low. However, what I have seen from the code of the nrfx_spim_xfer() function (called into the nrf_drv_spi_transfer function) I can only select the option NRFX_SPIM_PIN_NOT_USED of using ALL the SPI pins in this function or noone. Is there any mechanism available yet to let the function use the SPI pins except the SS pin, and move this manually like a GPIO?That is, let the nrfx_spim_xfer function manage the CLK, MOSI and MISO pins of the SPI but no the SS pin.
The other option I have is modify the code of the former functions (nrfx_spim_xfer and nrf_drv_spi_transfer) by using a parameter that could let me select the use of the SS pin in a way or in another. Or creating a copy of the nrfx_spim_xfer function with another name (like nrfx_spim_xfer_not_ss) and modifying the code but not using the SS pin, more creating a copy of the nrf_drv_spi_transfer function that would call to the new nrfx_spim_xfer_not_ss().
Thank you very much in advance.
Regards,
Joel