Hello, thats my first project with S32K.
I'm looking to find a example of how to implement a circular buffer (ADC to RAM using the DMA) in circular mode buffer. I need to sample 3s of data at 5KSa/s and keep these values in ram.
Attached is my project, the DMA is working fine but only one sample is being stored in buffer
Greetings
Excellent! Worked exactly as I expected but, after the amount of data has been captured (buffer full), how should I restart the DMA buffer transfer?
Hi@rvalente
below is my code,you can refer to it.
step1.
step2.
step3.
step4.
Done!
Best Regards!
Jim,
I use S32K142 EVB and modified some codes in your project to sample ADC0-SE8, ADC0-SE9, ADC0-SE12 through DMA, and then print the sampling results through the serial port.
You can try to optimize it,hope this will solve your problem.
BR,Jim
Hello,
tks by the reply but, I do not want to sample 3 channels sequentially, but to sample one channel at a given sample rate (then the use of lptmr) and have this sample fill the DMA buffer. So 3 seconds of sample @ 5KSa/s and 12 bits, Ill use 30720Bytes of ram.
So, how to set the DMA MODULO to sample and increment the buffer address?