START

TargetPWMPeriod = Longest ActualPWMPeriod = Longest

Drive L1

Read Temp. Sensor

De-energized coils = DeadTime

Control Loop

Continuously monitor the hall sensor output

Energize L1 / L2

Start Timer

Hall

N

Timeout?

N

Edge?

 

 

 

 

 

Drive L2

Read Temp. Sensor

De-energized coils = DeadTime

Y

Stop Timer

Record DriveTime

De-energize Coils

ActualPWMPeriod = DriveTime + DeadTime

Y

De-energize Coils

Sound Buzzer

Fault condition detected.

During the dead time delay update PWM period for the next commutation

128ms?

Y

N

Modify Target PWM period value every 128ms based on temperature

Update TargetPWMPeriod

Target > N

Actual?

Y

Increment DeadTime

reading

Target = N

Actual?

Y

Decrement DeadTime

Figure 3-2. Firmware Control Loop

Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0

Freescale Semiconductor

17

Page 17
Image 17
Freescale Semiconductor DRM079 manual Firmware Control Loop