Hi all, I am using SPIM with dma list triggered by gpiote. A gpio low-to-high event starts spim reading, and it works fine. However, I need to read different length at different spi register address.
The dma list examples I found always use constant reading length, as below:
typedef struct ArrayList
{
volatile uint8_t buffer[3];
} ArrayList_type;
static volatile ArrayList_type WriterList0[10];
nrfx_spim_xfer_desc_t xfer_desc = NRFX_SPIM_XFER_TX(WriterList0, 3);
I wonder how to change the maxcnt dynamicly without CPU intervention? For example, once the gpio event published, I want the spim read
i. 3 bytes from spi address a;
ii. 6 bytes from spi address b;
iii. 4 bytes from spi address c;
Thank you all.
Best regards.