Skip to content

Miscellaneous issues encountered

jmattsson edited this page Jan 8, 2012 · 2 revisions

Miscellaneous issues encountered

ADC

I cannot seem to get the ADC to behave properly in auto-triggered mode off the Timer1 COMP B interrupt. No matter what I try, I end up with spurious "conversion done" interrupts. I have double- and triple-checked that I'm not putting the ADC into free-running mode, and as far as the hardware tells me, it's not in free-running mode. I've resorted to a work-around of only enabling the ADC interrupt right after Timer1 COMP B fires, and then promptly disabling it again in the ADC interrupt routine. This does give me a nice stable sampling period, but I would much rather not run the ADC more than it should.

I can't find any errata suggesting anyone else is having this problem, so it could very well be something I'm doing wrong. If I find the time (and inclination) I'll go bare-metal and see if it still happens in the minimal case.

Clone this wiki locally