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

nRF52. Multiple transactions in SPIS mode with EasyDMA

Hi all,

Can I do something like this:

  1. The SPI master sets CSN line low.

  2. The SPI master sends multiple packets. And the total number of bytes exceeds the value of the register RXD.MAXCNT. For example, 1024B.

  3. The SPI master sets CSN line high.

Thank you in advance

Parents
  • Hi Anton,

    Both SPI and TWI (I2C) Master peripherals on nRF52 have so called "array list" option which should help you to achieve exactly this. You can set-up set of Tx/Rx structures (pointers) and let EasyDMA to process it. In case you would like to pretend to do just one (not multiple) transfers on SPI Master (I guess you are talking to some serial flash module which can typically read infinite sequences) then you should be able to manage CSN line in SW (before/after DMA transfer is done). However there is no example in nRF5 SDK (as far as I see) so I'm wondering if you or someone from Nordic could post it here once you make it work.

    More about Array List in SPIM on nRF5 here.

    Cheers Jan

  • Oh then no way to use HW SPIS peripheral on nRF5x with more that 255B transferred through EasyDMA, you will need to manage CSN hi/low/hi for each transfer I believe. Alternatively you can write your own interrupt driven SPIS but bit banging GPIO will obviously fail during extensive work by BLE stack (it will delay application interrupts and you will get it too late to capture incoming data).

Reply
  • Oh then no way to use HW SPIS peripheral on nRF5x with more that 255B transferred through EasyDMA, you will need to manage CSN hi/low/hi for each transfer I believe. Alternatively you can write your own interrupt driven SPIS but bit banging GPIO will obviously fail during extensive work by BLE stack (it will delay application interrupts and you will get it too late to capture incoming data).

Children
No Data
Related