This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
MSP430F6736 (actually, any MSP430F5/6 with DMA)
TI ADS7882 12 bit ADC with parallel interface
Our application requires very fast data transfer from the external ADS7882. There are 12 data lines (12 bit ADC) and 7 other lines for control/status. The ADS7882 will indicate when data is ready via a hardware line. Ideally, I'd like this hardware line to cause the MSP430 to read the data across 16 GPIO lines in a single DMA transfer.
It appears that the MSP430 DMA is only for internal peripherals, but if this is possible I'd like some guidance as to how we might go about it.
Note that we need 1.5 to 3 MB/Sec for our ADC. Can't use internal ADC for the MSP430 as it's not fast enough.
But what is the CPU going to do with the data?
It will process it in a batch during periods between taking data from the ADC.
What do you mean by "some port input register"?
My ADC has a 12 bit (13 I/O lines) output. Ideally I'd like to define a 16 bit-wide "register" based on a selection of GPIO attached to the ADC and then have the ADC signal the DMA to read it and transfer to memory.
For example if porta A (16 bits) is used as input...
#define Dma0SrcAdr 00512h
#define Dma0DstAdr 00516h
mov.w #PAIN, R15
mova R15, &Dma0SrcAdr
mov.w #BUFBEGIN, R15
mova R15, &Dma0DstAdr
mov.w #SIZE, &DMA0SZ
and triggering with...
mov.w #(DMADT_1 + DMADSTINCR_3 + DMASWDW + DMAEN + DMAREQ), &DMA0CTL
One line (from PAIN) can be used for ADC data ready, so all not valid (tested by data ready PIN) collected samples with DMA can be removed on micro side.
If MSP430 is running at 20MHz, there are only 20/3=6.x instruction cycles to process one ADC sample in average. I don't think MSP430 is fast enough unless the signal processing is very very simple. You probably need a faster CPU.
At 20MHz and 6 cycles for a transfer this allows at full bore 100 samples within a 5.0 microsecond sampling period. We need 1/10th of that, so the DMA should be fine. We're using this CPU to supervise the ADC, then store and move the data off to another CPU which does the signal processing. I think that within these constraints we'll be A-OK.
Not sure if we talk about the same.
As I understood Robert's comment, the core requires 3 clock cycles per instruction. For 20MHz core clock, that amounts to only 6 (machine) instructions to process each ADC sample. Coming from the Cortex M world, I don't know the MSP430 core in detail - better check for yourself.
Other Cortex M cores (from other vendors) have multiple ADC units which can run in a synchronized/interlocked fashion, with up to 2 .. 8 MSps. They are, however, not "low-power".
**Attention** This is a public forum