PSOC-5 ADC hanging

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Mrinal
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Hi

I am using a PSOC-5 chip to drive 8 channel buck converter. This is a continuation of an older product that was a 5 channel buck converter controlled by PSOC-4.

(There are high frequency switched inductors on board)

The problem is that the ADC starts behaving abruptly and gives results greater than 65000. This has been confirmed using the SWD monitor. The entire control loop freezes because of incorrect ADC readout and the LED driver stops working. (The MCU is still running).

As soon as someone touches the ADC input pin by hand, the ADC magically starts functioning normally and continues to do so. It only hangs randomly during power-on. If it survives the power-on stage, it works ok. But if it hangs during power-on, then someone needs to touch the ADC pin to get it working.

The input pin is buffered by an external opamp and the voltage is well within range.

Someone please share your experience as to why the ADC will start reading out abnormally high value and get OK when someone touches it.

Thanks

0 Likes
1 Solution
Mrinal
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Hi

The ADC hanging issue has been fixed.

It was a uint16 variable that was attaining a -ve value during runtime. After changing the type from uint16 to int, the program works correctly.

The only thing surprising is why touching a physical pin would effect firmware error!

View solution in original post

0 Likes
3 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Try to add ~10n bypassing capacitor on the ADC input pin and see if it helps

0 Likes
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

Does the ADC hanging issue fixed by now?

0 Likes
Mrinal
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Hi

The ADC hanging issue has been fixed.

It was a uint16 variable that was attaining a -ve value during runtime. After changing the type from uint16 to int, the program works correctly.

The only thing surprising is why touching a physical pin would effect firmware error!

0 Likes