AnsweredAssumed Answered

Wrong values on ADC without debugger but OK with debugger

Question asked by nazgul on Mar 31, 2017
Latest reply on Apr 2, 2017 by nazgul

I am using ADC1 in scan mode. When I run my code normally through the debugger, it works just fine. However, when I remove the debugger and directly run it, I am seeing extremely low voltages. What could possibly be the reason for this? Has anyone else seen this? I have compiler optimization turned off to ensure there isnt much of a difference due to compiler optimization. It does not happen on all boards and only on 10%. I have also tried slowing the ADC sample times to as low as possible(239.5 cycles). I normally run them on 1.5 on all boards and I am good (with and without debugger). I have also reviewed the board under a microscope and there is no hardware issue. FWIW, I am supposed to read 24V and I am reading 2.36V.