Commit c634178
committed
Fix exception due to static initialiser in ISR
Non-trivial static variables may require an initialisation routine
which is invoked on first call. This happens in the `hwTimerCallback`
routine when the `ElapseTimer` constructor is called, but that is unsafe
to do from interrupt context.
Moving this to a global variable fixes the issue.
The exception may vary, but I'm getting:
```
assert failed: xQueueSemaphoreTake queue.c:1718 (!( ( xTaskGetSchedulerState() == ( ( BaseType_t ) 0 ) ) && ( xTicksToWait != 0 ) ))
```1 parent 3091165 commit c634178
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
69 | | - | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments