cpu: msp430-common: fix context save/restore#3837
cpu: msp430-common: fix context save/restore#3837haukepetersen merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
This PR makes xtimer work on msp430. And honestly, I wonder how this platform could ever have worked without, GIE was randomly not activated after context switches. |
|
(I'm just realizing that this makes xtimer only work with the latest xtimer patches in #3525) |
|
@OlegHahm would you? :) Or did @haukepetersen steal your msb-430h flasher? |
|
He did, but I stole a Z1 with can be flashed without. I can ACK by testing. |
|
Just tried on the |
|
@haukepetersen hmk, will investigate. |
60c39a0 to
092ff04
Compare
|
Got it, UART receive rising edge interrupt was enabled, causing an interrupt loop. Again, I wonder how this could have ever worked before... Meanwhile, I switched the msp430fxyz boards back to using uart_stdio, the ugly hack doesn't cut it. |
Previously, __restore_context was meddling with the to-be-restored context SR on the stack, not correctly restoring GIE. Now, we let the CPU restore the correct status register as saved in __save_context. Contains some simplification of the context save/restore logic.
092ff04 to
483b595
Compare
Cut out that change into #3924. |
|
Now it works as expected. ACK and go! |
cpu: msp430-common: fix context save/restore
|
Awesome job, by the way! |
|
Thx! |
|
Indeed, nice one! |
Previously, __restore_context was meddling with the to-be-restored
context SR on the stack, not correctly restoring GIE.
Now, we let the CPU restore the correct status register as saved in
__save_context.
Contains some simplification of the context save/restore logic.