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

Confusion with List in EasyDMA

Hi,

The samples for using list are BUFFER = 4, but it does not specify is that is the only size that works, and what value do you place on NRF_SPIM0->TXD.LIST

In my case I need a buffer size of 8, and 46 samples. I implemented the following, among other code, which does not seem to have any effect. Am I missing something?

#define BUFFER 8

typedef struct ArrayList {
	uint8_t buffer[BUFFER];
} ArrayList_type;

ArrayList_type MyArrayList[46];
ArrayList_type MyReceiveList[46];

NRF_SPIM0->TXD.PTR    = (uint32_t)MyArrayList;
NRF_SPIM0->TXD.MAXCNT = 46;

NRF_SPIM0->RXD.PTR    = (uint32_t)MyReceiveList;
NRF_SPIM0->RXD.MAXCNT = 46;

nrf_spim_event_clear(NRF_SPIM0, NRF_SPIM_EVENT_ENDTX);
NRF_SPIM0->TXD.LIST = 8;  //I tried as per documentation to only place a 1 here.
NRF_SPIM0->RXD.LIST = 8;
nrf_spim_task_trigger(NRF_SPIM0, NRF_SPIM_TASK_START);	
Parents
  • OP mentions that he wants to transfer 46*8 bytes without interrupts, so just for the record, he doesn't need to use an interrupt to start the next transmission. It can be started using PPI channels and tasks and events, e.g. triggered by a timer or GPIOTE. Then you can use a counter to count the number of completed transmissions (still using PPI and tasks and events) and fire an interrupt after 8 transmissions. Here are some examples showing how EasyDMA, PPI, GPIOTE, timers, and counters can be used to trigger TWI transmissions from an accelerometer while the CPU is sleeping.

Reply
  • OP mentions that he wants to transfer 46*8 bytes without interrupts, so just for the record, he doesn't need to use an interrupt to start the next transmission. It can be started using PPI channels and tasks and events, e.g. triggered by a timer or GPIOTE. Then you can use a counter to count the number of completed transmissions (still using PPI and tasks and events) and fire an interrupt after 8 transmissions. Here are some examples showing how EasyDMA, PPI, GPIOTE, timers, and counters can be used to trigger TWI transmissions from an accelerometer while the CPU is sleeping.

Children
No Data
Related