This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI Pack of length in SDK 11.0

hi,

The SPI pack's maxsize is 255?

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);

How to change the SPI pack length.

Parents
  • Hi,

    Which device are you using? The maximum of 255 bytes is a HW limitation in the nRF52 SPIM peripheral, where the RXD.MAXCNT, RXD.AMOUNT, TXD.MAXCNT and TXD.AMOUNT all are 8 bit fields. There is no way to increase the transaction size in that case, but you can split up longer transactions if needed.

    (There is no such limitation in the SPI peripheral (no DMA), but the unified driver still uses uint8_t for length, so you cannot achieve longer transactions without modifying the driver.)

Reply
  • Hi,

    Which device are you using? The maximum of 255 bytes is a HW limitation in the nRF52 SPIM peripheral, where the RXD.MAXCNT, RXD.AMOUNT, TXD.MAXCNT and TXD.AMOUNT all are 8 bit fields. There is no way to increase the transaction size in that case, but you can split up longer transactions if needed.

    (There is no such limitation in the SPI peripheral (no DMA), but the unified driver still uses uint8_t for length, so you cannot achieve longer transactions without modifying the driver.)

Children
Related