We are using the nRF52840 SPIM0 to read 2048 bytes from an SPI slave. ( SES / SDK15.3 )
The nrf libraries only seem to support a maximum of 255 bytes, so we have compiler warnings when trying to us a uint16_t value as the buffer size.
Reading through the Q&A's it seems that the nRF52840 is capable of this, and the libraries were being updated to support it.
Have the libraries been updated? Is there an example of an SPIM transfer > 255 bytes using these new libraries?
Which one of the various functions in the SDK do you use?
The structure from nrfx_spim.h uses size_t for transfer sizes and should not trigger compiler warnings.
The driver nrf_drv* use uint8_t for the length field for historic reasons (nRF52832). As @turboj wrote, this limitation is not present in nrfx, so you can work around this by using the nrfx_spim driver directly.
I've started out with the SPI library example, which still utilizes the old nrf libraries. Are there any newer examples which use only the nrfx spim drivers?
There are no examples that use nrfx directly. You can do it, but then you should remember to remove all configurations for the legacy driver in your projects sdk_config.h. Another alternative, which may be easier, is to just modify the nrf_drv_spi.c/.h files to use size_t. As you can see from the nrf_drv_spi implementation it essentially just calls the nrfx drivers, so changing all the length parameters from uint8_t to size_t should be enough.
Thanks Einar. I removed the legacy drivers and libraries and updated the calls and it all works perfectly.