page1
Set up phase map.
Set up interrupts.
Set up ports.
Get controls values
Read sensors
Set space
Set BLDC phase mark from sensors
ISR: Control read
Get ADC channel index
Store ADC value for controls
Set to read other ADC channel
Initiate next read
End
START
Read data
Sleep 1 second
Show banner
Show data
ISR: Shaft moved
End
Start space timer interrupt
ISR: Space Timer Expired
End
Start mark timer interrupt
Get controls values
Set space
ISR: Mark Timer Expired
End