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

SPI communication via DMA in background using ppi and a timer

Hi,

I've just realized the project from 

https://github.com/Martinsbl/nrf5-mpu-examples/tree/master/nrf52-mpu-easydma-using-gpiote-and-registers

And it is working quiet well. Now I need something similar for SPI communication. I've tried it with the registers but so far no success since in the new SDK there is no CS entry for the register:

typedef struct {

  __IOM uint32_t  SCK;                          /*!< (@ 0x00000000) Pin select for SCK                                         */

  __IOM uint32_t  MOSI;                         /*!< (@ 0x00000004) Pin select for MOSI signal                                 */

  __IOM uint32_t  MISO;                         /*!< (@ 0x00000008) Pin select for MISO signal                                 */

} SPIM_PSEL_Type;                               /*!< Size = 12 (0xc)                                                           */

So is there any official or unofficial example for using the NRF_SPIM0->... either via driver or directly via the registers?

So far in the TWIM example it is not possible to switch between DMA and direct write without uninitialization of the SPI.

Best regards,

C.W.

Related