2025-01-09 05:04 PM - edited 2025-01-09 05:07 PM
Hi,
I have a very strange ADC issue which I am unable to find the root cause to. The symptom is as follows;
While performing ADC readings to ADC1 IN1 and ADC2 IN1 consecutively, the readings sometimes differ by more than 32 ADC counts. I perform this check as part of BIST. This only happens when at the same time a UART signal is coming in to USART3_RX (115kbps). To prove that the USART3_RX is causing the problem, I sever the connection or stop transmission (both produce the same result). The issue goes away and everything works fine.
What could be the issue? Is there something else I could do to mitigate this issue besides stopping the UART signal?
I have not been able to mitigate the issue so far. All my efforts so far to uncover the issue have not yielded any results.
I am aware that these 2 channels are essentially routed to the same pin and shared by the 2 ADCs so the readings should be identical if not very close.
2025-01-09 09:57 PM
How are the pins externally connected?
What are the details for measurement like sampling time? Code?
2025-01-09 09:59 PM
Are those two readings taken simultaneously or in close succession?
Is the input signal rock stable?
What happens if Rx signal is present but you disable Rx in software?
What happens if you introduce deliberate delays in software?
JW
2025-01-09 11:57 PM
To answer your questions;
1. The 2 readings are taken in close succession.
2. Input signal is rock solid, essentially at mid-rail ie. reads 2048 counts
3. USART3_RX pin is not configured as USART3 yet at that point. It is in reset.
4. Did not try injecting delays. Do you mean delays between the 2 readings?
-m
2025-01-10 12:04 AM
The pin is connected to the output of an op-amp. The signal measured should be at mid-rail (ie. 2048 ADC counts).
Sampling time is set to 2.5ADC clocks.
2025-01-10 12:30 AM - edited 2025-01-10 12:32 AM
> The 2 readings are taken in close succession
Read errata and the 'G4-specific ADC appnote.
I don't know how exactly is it related to UART, if there's no code - maybe through common ground, maybe through injection through the overvoltage protection diodes.
JW
2025-01-10 01:28 AM
Dear macbum,
There can be some reasons for ADC error:
Please read this AN5346 for tips and source of problems:
Regards
Igor
2025-01-10 02:12 AM
Hi,
so to find/exclude a hardware problem (stray in signal):
- did you check the adc signal at the pin with a DSO ? (to see, whether there is any spike)
- put a resistor 1kohm in the line, at the rx pin, to avoid any hi speed transient here. Then check again.
2025-01-12 11:36 PM
Dear Igor,
1. The op-amp we are using have 10MHz bandwidth. Settling time is 500ns. ADC is configured into synchronous mode. Clock is SYSCLK at 168MHz, with prescaler at 256. Therefore the sampling frequency is already quite low and should be sufficient at 2.5 ADC clock cycles.
2. We also checked PCB traces and didn't find any abnormality. The analog and digital signals have their own layers. There is no crossing of the signals so we also rule this out.
3. We are not using internal op-amp.
4. This is a suspect but after probing this, we did not detect any anomalies.
5. We are not using internal VREFBUF.
The problem with this issue is that it is not easy to reproduce under controlled conditions. So far we have only detected this in our product rig and only happens under very specific conditions. We have confirmed that keeping the UART signal quiet eliminated the problem so this is the cause but we would like to determine the root cause.
-m
2025-01-12 11:40 PM
Hi @AScha.3 ,
We have not tried probing the signal yet. This will take time. Currently we try to sample in code to collect data. We already have a resistor in series at the RX and TX pins.
Now, the pins that are used for the UART, USART3 is not yet configured as a UART at the time that this issue occurs. The pins are still configured as analog. This should not have any bearing on this issue. Correct?
-m