Initialise M0 state at startup.

This is not currently essential, since the current M4 code will not
trigger an SGPIO interrupt until the offset and tx fields are set.

In future though, we want to explicitly set up the M0 state here.
This commit is contained in:
Martin Ling
2021-12-20 13:47:34 +00:00
parent 5df28efb3f
commit 14065bb69d

View File

@ -150,6 +150,12 @@ main:
ldr value, =STATE_BASE // 2
mov state, value // 1
// Initialise state.
zero .req r0
mov zero, #0 // 1
str zero, [state, #OFFSET] // 2
str zero, [state, #TX] // 2
loop:
// The worst case timing is assumed to occur when reading the interrupt
// status register *just* misses the flag being set - so we include the