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:
@ -150,6 +150,12 @@ main:
|
|||||||
ldr value, =STATE_BASE // 2
|
ldr value, =STATE_BASE // 2
|
||||||
mov state, value // 1
|
mov state, value // 1
|
||||||
|
|
||||||
|
// Initialise state.
|
||||||
|
zero .req r0
|
||||||
|
mov zero, #0 // 1
|
||||||
|
str zero, [state, #OFFSET] // 2
|
||||||
|
str zero, [state, #TX] // 2
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
// The worst case timing is assumed to occur when reading the interrupt
|
// The worst case timing is assumed to occur when reading the interrupt
|
||||||
// status register *just* misses the flag being set - so we include the
|
// status register *just* misses the flag being set - so we include the
|
||||||
|
Reference in New Issue
Block a user