AnsweredAssumed Answered

BF524: use Sport1 to acquire ADC, get wrong sequence data sometimes

Question asked by aqbhc on Aug 5, 2015
Latest reply on Aug 24, 2015 by Prashant



i am a engineer of GE, i want to use Sport1 to acquire ADC(adc124s101), but get wrong sequence data sometimes, it maybe wrong, 1 time every 300 times start/stop acquisition;

such as i send command to ADC:


I use DMA5/6 with sport1 to send this data * 15 every time; and get the data of ADC:

channel 0,  channel 1,  channel 2,  channel 3

I will get (channel 0,1,2,3)*15 every time;

but sometimes, i maybe get the data by this sequence: channel 3, channel 0,  channel 1,  channel 2, the sequence is wrong;

I don't know the root cause of it;


I have tried some solutions:

1. clear Sport FIFO before start DMA and sport transmission

2. clear Sport FIFO after stop DMA and sport transmission

3. create a ISR to print error message when sport1 status have any error

4. create a ISR to print error message when DMA5/6 have any error

But i don't get any process, the issue does still occur;

I have attached the code about the sport1;

the app will call sport1_init and sport1_interrupt_init to initialize the sport 1 parameters; and call sport1_start/ sport1_stop to start/stop acquisition;

please help to check this  codes, soprt1 and DMA5/6 configuration to help us to find where is wrong?

this issue is very urgent, please help to check it.