Go Down

Topic: Interrupt and DMA on Arduino Due (Read 468 times) previous topic - next topic

MDNARD10

Nov 08, 2017, 03:36 pm Last Edit: Nov 08, 2017, 03:41 pm by MDNARD10
In a Data acquisition application, I am sampling packets of data from the Arduino due SSC and transmit processed data through Ethernet, using DMA. With this approach, I can transmit to Ethernet only one of every two packets: sampling a packet, transmitting it to Ethernet during the second packet, ...
I am looking for a way to be able to transmit all processed packets.
I tried to to sample the input data using interrupt, which would allow sampling during the Ethernet transmission. The sampling part works OK. But then the process gets stuck on Ethernet transmission, which uses DMA. Is there a way to  make DMA and interrupt coexist without the process stuck?

Thanks for any idea.

Mike

ard_newbie


How about posting your code (between code tags).

MDNARD10

The code is a little bit complicated for whose who do not know the SSC peripheral quite deeply.
But what I found is this:
Transmission of UDP packets to Ethernet uses 3 commands:
Udp.beginPacket(destIP, localPort); //Listen incoming data
   
Udp.write(Txbuf, sizeof(Txbuf));     // Write buffer Txbuf to Ethernet
   
Udp.endPacket();                          //Close transmission

The software is stuck at the second command.
If I use regular polling instead of interrupt, no problem but with the limitation of acquiring to Ethernet only one out of two packets.

Go Up