Hang on ADC conversion? | Cypress Semiconductor
Hang on ADC conversion?
I'm debugging a odd little error on a sensor project I'm working on. My project is running current through external loads with IDACs, and taking sample with ADCs, all happen on timer interupts. Other than to run a IDAC changer, or take a sample and write it to Eeprom, the device remains in AltActive mode with as many things turned off as possible. (Can't go to sleep unfortunately because IDACs don't run in sleep mode).
Every once in a while, not at all frequently, my sensor seems to hang, get stuck, and never change its outputs/take samples (which I log and read later), until a power refresh.
Unfortunately, the project has a number of timer interrupts that don't play nicely with debug mode, so I'm mostly using GPIO (and led) debugging methods. So I haven't pinned down yet what might be causing this, mostly because it's so infrequent.
Anyway, my question after all this was that I use the ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT); api to wait for samples before writing it eeprom.
Can this API, or in general the ADC, ever hang indefintely?
Note: I do play with my clock speeds. I turn speeds down, then turn them back up before turning ADCs on, then after sampling is finished turn them down again.
Really, just asking question to locate or eliminate possible sources of the bug. This is one of the few blocking statements in my code, so was just trying to figure out if it could be a source of trouble.