App#
app.c contains state machines run in the RTOS.
Functions#
-
void app_setup()#
Run during MCU init to initialise various perihperals.
Note
Order of operations
Starts ADC
Enables the DRV chip and calibrates amps
Start timers
Sets absolute encoder offset
Zero out phase PWM
Enable low side gates
Start FOC interrupt
-
void app_status_led_task()#
RTOS task to run status led.
s