This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52 driver, nrf_drv_spis_buffers_set(): is max buffer size uint8_t?

Hello,

I am trying to get SPIS EasyDMA to work. Currently the SPIS MISO response with high when the CS is pulled low by another master device, but no correct data present on the MISO.

The SPIS is setup via:

  1. Enable SPIS0 in config

  2. define SPIS0 instance with NRF_DRV_SPIS_INSTANCE()

  3. get a config with NRF_DRV_SPIS_DEFAULT_CONFIG, and plug in the desired settings

  4. initialize using nrf_drv_spis_init(), I am using a placeholder event handle

  5. the I go to another route from the drivers, so I am doing &spis->TXD.MAXCNT = 1080, and &spis->TXD.PTR = (int32_t) buf

  6. I disabled the interrupts with nrf_spis_int_disable()

I am not using the nrf_drv_spis_buffers_set(), because it only take uint8_t as buffer length, while I am hoping to transfer a buffer of 1080 is one setting. Is this definition consistent with HW capability, so it is limited to 255? How about List? How to work with that on the length?

Right now my code is not working right yet, again, the MISO pulls high when the CS is driven low from external, SPI clock present, at 1 MHz. Just not seeing the right data which I am also observing through UART locally via same pointer to the buffers.

If I stitch in the nrf_drv_spis_buffers_set() call in the data process routine, the current error code is 0x08, invalid state.

So please advise before the weekend to help me to have more fun making progress! Thanks.

FI

Parents Reply
  • Is there a technical reason that someone would not want to increase this SPI transfer size? I think 255 bytes is a reasonable SPI transfer size and probably hits a sweet spot between bandwidth and potential corruption but figured I'd ask.

    Is this a potential hardware or the EasyDMA limit?

Children
No Data
Related