AnsweredAssumed Answered

stm32L476 12 Bit ADCs causing Spikes in Data

Question asked by Scheiner.Benedict on Jan 30, 2017
Latest reply on Jan 31, 2017 by Scheiner.Benedict

Hi there,

I am using the Stm 32L476 and I am trying to use 2 ADCs with 2 channels each with 12 Bit. So 4 Channels all together. I am using the ADCs in Regular simultanuous  multimode with DMA so I am able to transmit the data from  DMA to USART afterwards.
Now I encountered a problem, that sometimes I get spikes of almost 255 Bits in my data.
In Matlab I receive the data, so 2 Bytes for each ADC.  The spikes happen, when the Byte with the LSB has an overflow.
One example with two consecutive ADC values consisting of two bytes:
1.)00000110  01111100      (6   252)

2.)00000110  00000000     (6    0)


It seems like the ADC transmits the first byte with the MSB and after that it gets an overflow in the second one, but cant correct it in the first byte. The next ADC value has the corrected first Byte. So each spike always consists of only one value.
If I use the ADCs with 12,5 Cycles sampling time and with a prescaler of 64 (f=16MHz), it works fine and I cannot see any spikes.  Nevertheless it would be nice if I can run the ADCs faster...
Can somebody imagine what goes wrong here?


Thanks a lot in advance!