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

why SPI easyDMA maxcount is limited to 256byte?

Hi,

In the nrf52.h, SPIM_RXD_Type is defined as below.

typedef struct {
  __IO uint32_t  PTR;/*!< Data pointer */
  __IO uint32_t  MAXCNT;/*!< Maximum number of bytes in receive buffer*/
  __I  uint32_t  AMOUNT;/*!< Number of bytes transferred in the last transaction*/
  __IO uint32_t  LIST;/*!< EasyDMA list type */
} SPIM_RXD_Type;

So, NRF_SPIM0->RXD.MAXCNT can be set more than 256 and up to 2^32-1.

Why nrf_drv_spi_transfer's length argument is limited to 8bit?

I can't use ppi with SPI easyDMA (list feature), because SPI module is used by 3 sensors.

Thank you.

Parents
  • you mean,

    1. connect spi transfer ENDRX event and timer count task using ppi.

    2. connect timer compare event(triggered when counter reaches array list size)and spi stop task using ppi.

    3. enable timer compare event IRQ and in the IRQ set spi_xfer_done true.

    4. use nrf_drv_spi_transfer() with NRF_DRV_SPI_FLAG_TX_POSTINC, NRF_DRV_SPI_FLAG_RX_POSTINC, NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER, and NRF_DRV_SPI_FLAG_REPEATED_XFER flag (= without NRF_DRV_SPI_FLAG_HOLD_XFER flag).

    is this true?

    If not, because I couldn't have found any sample code using spi list mode, can you show me the sample code or procedure?

    Thank you.

Reply
  • you mean,

    1. connect spi transfer ENDRX event and timer count task using ppi.

    2. connect timer compare event(triggered when counter reaches array list size)and spi stop task using ppi.

    3. enable timer compare event IRQ and in the IRQ set spi_xfer_done true.

    4. use nrf_drv_spi_transfer() with NRF_DRV_SPI_FLAG_TX_POSTINC, NRF_DRV_SPI_FLAG_RX_POSTINC, NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER, and NRF_DRV_SPI_FLAG_REPEATED_XFER flag (= without NRF_DRV_SPI_FLAG_HOLD_XFER flag).

    is this true?

    If not, because I couldn't have found any sample code using spi list mode, can you show me the sample code or procedure?

    Thank you.

Children
No Data
Related