Other Parts Discussed in Thread: CC2530
Hi,
I have an issue with DMA while using it with ADC. I have couple of sensors (7) connected to port 0 of ADC. I am trying to get a data rate as high as possible. I am using 32 MHz system clock, and timer 1 channel 0 to trigger ADC every 1.5 ms to do a sequential conversion over all the 7 sensors except pin 0.7 which is used as input reference voltage. each ADC conversion takes 132 micro seconds so 7*132 =924 micro total, this means I still have enough time before initiation of next sequential conversion. meanwhile ADC triggers DMA channel 0 to move data to memory using trigger #20 of table 8-1 of CC2530 user's guide. In order to be able to send a packet every 10 msec DMA is disarmed, data is sent and DMA is armed again for next data transfer. However, timer and the clock is counting while DMA is disarmed and armed again. Here is the problem, when I do high data rate (666 Hz), data from sensors are put in the wrong spot of the memory i.e. the results of conversion of a data from pin 0.0 appears in the pin 0.6 and vice versa ( all the data from ADC are being shifted 2 or more spots a head). This does not happen in low data rate like 15 Hz. What could be possible scenarios for this error? I can give some more explanations if needed.
Thanks in advance,
Leila