summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pendsv.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/pendsv.c')
-rw-r--r--stmhal/pendsv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stmhal/pendsv.c b/stmhal/pendsv.c
index d7104d8518..68455b2752 100644
--- a/stmhal/pendsv.c
+++ b/stmhal/pendsv.c
@@ -31,7 +31,10 @@
#include "py/runtime.h"
#include "pendsv.h"
-static void *pendsv_object = NULL;
+// Note: this can contain point to the heap but is not traced by GC.
+// This is okay because we only ever set it to mp_const_vcp_interrupt
+// which is in the root-pointer set.
+STATIC void *pendsv_object;
void pendsv_init(void) {
// set PendSV interrupt at lowest priority