Problems with interrupts not working

*** BEGINEER ALERT ***

Just thought I'd throw that alert in, so you are aware  you can't assume anything in terms of base level knowledge here!  I'm coming from a Cypress PSOC background, so am not that familiar with the Nordic SOC and nRF Connect, etc.

Anyway, I'm trying to understand how GPIO interrupts can be set up and made to work.  I'm following the "button" example code in \v1.7.0\zephyr\samples\basic\button.  I can get that to work on my nRF52-DK.  So, that's a start.

However, when I try and write my own variation of code that responds to a button press in an interrupt service routine (or handler, whatever you Nordic peeps call these things), my code seems to crash.

My prf.conf file looks like this:

CONFIG_GPIO=y
CONFIG_ASSERT=y
CONFIG_ASSERT_VERBOSE=y
CONFIG_ASSERT_NO_COND_INFO=n
CONFIG_ASSERT_NO_MSG_INFO=n
CONFIG_RESET_ON_FATAL_ERROR=n
And when I push one of the buttons that is supposed to generate an interrupt and blink and LED, this is what I get on nRF Terminal:

ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:1262
I have no idea what that means!!

I'm clearly missing something fundamental in the setup of my code (which I used the led_blinky example as a starting point), but I don't know what that is.  Anyone got any ideas?

Cheers,

Miike

Parents Reply Children
No Data
Related