Commit 0a43527
authored
Fix multicore SoftwareSerial IRQ handling (#3336)
The _handleIRQ callback for SerialPIO would be called for both cores
if both had SerialPIO objects running. This would cause both cores to
execute reads and queue updates, in parallel, at the same time, from
the same PIO. This is a very bad thing and causes random data corruption.
Now, store the core we started on and only handleIRQ if the current core
matches the one we're running on.1 parent 90fe158 commit 0a43527
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
0 commit comments