Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 SPIM Easy DMA buffer >255bytes

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?

Parents Reply
  • 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.

Children
Related