![Cypress FM0+ S6E1A1 Series User Manual Download Page 9](http://html1.mh-extra.com/html/cypress/fm0-s6e1a1-series/fm0-s6e1a1-series_user-manual_2705955009.webp)
System Firmware Design
FM3/0+ Family Fan Motor Control User Manual, Doc. No. 002-04392 Rev. *B
8
3.3 Firmware Flow Chart
The flow chart of main functions is shown in
Figure 3. Main Loop Flow Chart
Start
Initial Gpio
Initial PWM
Time Delay
Initial ADC
Motor Parameters Set
Initial WDT
Feed WDT
Initial Timer
Stop?
N
Communication
Set Target Speed
Y
Re-start?
N
Re-start Function
Y
Start?
N
Start Function
Y
If the function is selected,
please enable the macro
Initial NVIC
Stop Function
End
Running motor control
Start
RtUnderflowIntHandler
End
Get AD sample data
Start
ISR_ADC_unit0
End
Set fault flag and stop motor
Start
End
Update register OCCP
Start
DtifIntCallback
ISR_MFT0_FRT
End
Set fault flag and stop motor
Start
WdgSwCallback
End
Set fault flag and stop motor
Start
WdgHwCallback