AnsweredAssumed Answered

How to transmit 16bit data on ADSP-21992 through an 8bit-EMI interface via DMA?

Question asked by Akiba on Dec 3, 2009
Latest reply on Feb 5, 2010 by vishwanath

Hello everyone,


I have an application where an ADSP-21992 is gathering data with the in-built ADC at a high rate and storing it into an array of integers (ring buffer).


On the external memory interface I use an Ethernet module to convey the collected data to a PC. It has an TX buffer that must be filled with the payload



This module has an 8bit data bus, so I have to transmit the 16bit integers split into two parts..

On a system where bytes can be addressed separately, I would merely cast the pointer-to-int into a pointer-to-char and everything would be fine.


Here on this 16bit-word addressed architecture, I used an extra outbound buffer that I can send easily:


char outbound[NUMBER_OF_VALUES << 2];

//secstart: pointer to begin of actual sector/part of ringbuffer to be transmitted in one IP packet

unsigned int secidx; // sector index
for (secidx = 0; secidx < NUMBER_OF_VALUES; ++secidx){
    outbound[secidx<<2]       = secstart[secidx] >>   8;
    outbound[(secidx<<2)+1] = secstart[secidx] & 0xFF;



But now, speed issues come in. As processing time is really expensive during ADC sampling time, I want to use DMA to copy the ADC-data into the module's send buffer. I.e. an interrupt service routine should read out the ADC, do some calculations and store the resulting integers into the ring buffer.

An idle loop checks regularly whether there is enough data garnered to fill an IP packet and triggers the sending process, With DMA, collecting and sending could be done in parallel.


Sean's post at helped me to understand the problem now fully (thank you), but how I have no idea how to solve it. I don't think that DMA can work on bit-fields?


Do I really have to copy the whole buffer segment of integers into another buffer of char where I shift every other byte by eight bit? That would slow down the performance significantly! Or can the DMA controller reformat the integers into chars by it's own?


kind regards,