-
Notifications
You must be signed in to change notification settings - Fork 997
Description
I am getting: panic: runtime error: nil pointer dereference .. whenever I enable interrupts in my test code.
The interrupt handler does not seem to be doing anything .. (do println statements work in the handler?)
Is there any way to find where the Panic is occurring? Is there a good example for using Interrupts on the Pico?
I am essentially doing the following to use interrupts:
//Interrupt pin:
comp_A.Configure(machine.PinConfig{Mode: machine.PinInputPullup})
//Set interrupt (presume interrupt is now enabled)
comp_A.SetInterrupt(machine.PinRising, handlerA_rising)
// Handler
func handlerA_rising(p machine.Pin) {
comp_A.SetInterrupt(0, nil)) // Disable interrupt !! not sure if you have to disable interrupt to ensure another one does not happen in this handler ???
///.... do stuff
}
Any idea's