This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hardware event handler

Hello, I need to connect an event handler (i.e. a function) to two NRF_RADIO events: -NRF_RADIO->EVENTS_ADDRESS -NRF_RADIO->EVENTS_READY

I know I should use the NRF_RADIO interrupt handler, but I can't. I'm using the bluetooth and then the softdevice is running. If I try to enable the interrupts in the NRF_RADIO->INTENSET the device goes into hard fault.

Anyway I've found a workaround by using PPI and GPIOTE. The PPI toggles an output pin when it receives one of the events, the output pin is externally shorted with an input pin, and this pin is configured to call the handler function. The nice thing is that it works, but I don't like to physically short the output an input pins...

Is there a better way to do it? I mean, is there a way to connect the PPI task end point to an handler function? Or maybe directly connect the NRF_RADIO->EVENTS_x to and handler function?

Related