From bc042c0c3424f938c1747390e74b755a36edf12b Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Mon, 4 Nov 2019 09:20:44 -0800 Subject: [PATCH] Record ISR entry/exit, when added via AttachInterrupt(). This only affects debug level 3 (Segger SysView) builds. --- cores/nRF5/WInterrupts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cores/nRF5/WInterrupts.c b/cores/nRF5/WInterrupts.c index 9f698852..dce18ca7 100644 --- a/cores/nRF5/WInterrupts.c +++ b/cores/nRF5/WInterrupts.c @@ -144,6 +144,10 @@ void detachInterrupt(uint32_t pin) void GPIOTE_IRQHandler() { +#if CFG_DEBUG >= 3 + SEGGER_SYSVIEW_RecordEnterISR(); +#endif + uint32_t event = offsetof(NRF_GPIOTE_Type, EVENTS_IN[0]); for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++) { @@ -166,4 +170,8 @@ void GPIOTE_IRQHandler() event = (uint32_t)((uint32_t)event + 4); } + +#if CFG_DEBUG >= 3 + SEGGER_SYSVIEW_RecordExitISR(); +#endif }