DMA does not work properly with LPC4088 (QSB)

cancel
Showing results for 
Search instead for 
Did you mean: 

DMA does not work properly with LPC4088 (QSB)

714 Views
shogo_matsubara
Contributor I

LPC4088 QSB is used.

I want to acquire 128 samples each using DMA at a sampling rate of 16kHz.

I have two problems now.

Problem 1:

1kHz analog input is A / D converted and acquired by DMA.A clean waveform can be obtained when the ADC rate is set to 400 kHz, but if the rate is set to 1 kHz, the waveform will be very noisy.

This does not happen when polling and interrupts are used.

Problem 2:

When the DMA transfer size is set to 1 and 128, etc., the waveform obtained by DMA is different even if the same analog waveform is input.

(D / C conversion and seeing waveform with oscilloscope)

The source code uses periph_adc of the following sample code.

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...

Thank you.

lpc4088 qsb‌ lpcxpresso lpc4088

Labels (2)
1 Reply

303 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hello,

 

I am sorry for the late reply.

 

I tried to replicate your issue in my LPC4088 QSB. I used the software provided by Embedded Artist. You can download it 

 

https://www.embeddedartists.com/wp-content/uploads/2018/06/lpcopen_2_10_lpcxpresso_arm_university_40...

 

I set the sample rate to 16 KHz and modified the ADC example to use the DAC to output the DMA value. My output when using 1 KHz input signal is the following.

pastedImage_2.png

 

As you can see, I get a pretty similar signal to my input. If you see something I am missing in order to replicate this issue please let me know. Also if you need the code I used to test this please let me know and I can send it to your email.

 

Best regards,

Felipe

0 Kudos