I have a custom nRF52840 board, very similar in basic design to the nRF52840 Dongle, but with a 9DOF sensor. The sensor asserts an output pin when data is ready. This output is connected to a port pin on the nRF52840. The code sets up a pin change interrupt on this signal.
The code uses SDK 15.3.0, with no changes in the pin change interrupt functions etc...
When running "stand-alone" i.e. debugger cable disconnected, the code works exactly as expected -- the event handler is called etc...
However, when running the exact same code using the debugger (through the Debug Out port of a nRF52840 DK), the event handler is never called.
For example:
- start the code in "stand-alone" mode -- the code works correctly
- plug the 10-pin cable into the Debug Out port on the DK -- the code keeps working correctly
- From within SES, go Target->Connect J-Link -- the code keeps working correctly
- From within SES, go Target->Attach Debugger -- the code keeps working correctly
- In debugging mode, pause and continue execution -- the code keeps working correctly
- Restart the code, then run -- the event handler is never called.
Similarly:
- If I download the code directly and then run (Debug->Go), the event handler is never called.
Does the nRF52840 in debug mode alter the way pin change interrupts are handled?
What is going on here?