7 years, 5 months ago.

DMA/Ethernet buffer access

We are using an mbed NXP LPC1768 microcontroller. Basically we are sampling current and voltage waveforms at 10kHz using an ADC. We then use the data recorded to run a FFT at 50Hz, all on the microcontroller. We have implemented the code to do that and 'fit' it on the mbed. The problem we are facing now is the export of the FFT output data in a fast enough and as little resource intensive as possible manner. Every 20ms when the FFT is finished, we need to export 6kB of data to a PC which will then further process the data. In order to achieve this we envisaged to use the dedicated DMA hardware to store the data in a continuous buffer which would then be accessed directly by the Ethernet layer to process and send the data.

The libraries available do not seem to have been used for this particular solution before and quite frankly we don't know how to implement it. Therefore, any help in how to achieve this or where suitable resources can be found would be much appreciated.

Thank you!

1 Answer

7 years, 4 months ago.

Tom,

http://mbed.org/forum/mbed/topic/1798/ describes using Timer + DMA to acquire timed samples and MODSERIAL + MODDMA also show how to send bulk data over the serial port without much CPU overhead.

See http://mbed.org/cookbook/MODSERIAL_dma

Andy

Accepted Answer