ADC interrupt not being called

Status
Not open for further replies.

Erik

Member
I'm using pedvide's ADC library for my teensy 3.6.
I can't get an interrupt to work though. I've modified an example from that libraries examples folder. The interrupt I'm talking about is the one the ADC should request when it is done a conversion and has a value ready. I'm simplified the example to just use one pin on ADC 1 (pin A16). Basically, an intervalTimer ISR is called every second, and in that ISR, I call adc->startSingleRead(), which returns immediately, but the adc_isr() should be called when the conversion is done, but the program never enters it. I have asked some (other) questions on pedvide's forum but haven't heard back.
Specifically, I am wondering how the teensy knows which isr is registered anyway. On other microcontrollers, I recall modifying an NVIC vector table with the name of an isr function. The example doesn't do that. But, the intervalTimer works,so I'm confused how.
The example .ino sketch is attached, thanks if you can provide a tip.
View attachment analogReadIntervalTimer_mod2.ino
 
Ok well I figured it out and I think several things were wrong.
I found relevent issues on the git hub page for the ADC repo and incorporated those. I then got the ISR to be called (but I am still wondering how the names are chosen and how the compiler knows which ISR is which?). Then, I was calling readSingle() without an argument, when I should've specified readSingle(1) for ADC1.
 
Status
Not open for further replies.
Back
Top