English
Language : 

33937_09 Datasheet, PDF (39/48 Pages) Freescale Semiconductor, Inc – Three Phase Field Effect Transistor Pre-driver
FUNCTIONAL DEVICE OPERATION
LOGIC COMMANDS AND REGISTERS
IC Initialization
Here is a possible flow to initialize the IC and its software environment.
1. Apply power (VSYS) to module
1.1. With RST still low, VSUP and VSYS current will be low because it will only be leakage and the small hold off bias
current.
2. Remove RST (EN1 and EN2 are still low)
2.1. When RST rises above the threshold, the IC will power-up. The charge pump (if configured) will start, and VPWR and
VLS will stabilize.
2.2. VDD will rise as the internal regulator charges the external reservoir capacitor and the IC will come out of reset.
2.3. Initialize interrupt handler for MCU
2.4. Interrupt will occur because of the RESET (Interrupt processing will occur here)
3. Initialize registers
3.1. Initialize MASK register by sending 0010 xxxx or 0011 xxxx to mask out unwanted interrupts.
3.2. Set desired dead time either by commanding zero dead time or calibrating the dead time.
3.3. Send MODE command with desired bits, and also the Lock bit. e.g. 01000001. This prevents further mode changes.
4. Bring EN1 & EN2 high
5. Initialize the outputs
5.1. Command all Px_LS and Px_HS to logic 1 simultaneously (command ON Low Side, sequentially switching the phases
will reduce the transient with very large bootstrap capacitors and may prevent an unintended reset)
5.2. Command all Px_LS and Px_HS to logic 0 simultaneously (command ON High Side)
5.3. Command all Px_LS and Px_HS to logic 1 simultaneously (command ON Low Side)
5.4. The device is now ready for operation.
MAIN LOOP
1. While (forever)
1.1. Send SPI messages (except NULL1-3), read results
1.2. If sending NULL1-3 messages, use a semaphore to detect interrupts
1.2.1. Set Semaphore flag in RAM
1.2.2. Send NULL1-3
1.2.3. Send NULL0, read SR1-3
1.2.4. If Semaphore is still set, then result is good, else go to 1.2.1 (because an interrupt has gotten in the way)
1.2.5. Clear semaphore
2. END
Interrupt Handler
When an interrupt occurs, the general procedure is to send NULL0 and NULL1 commands to determine what happened, take
corrective action (if needed), clear the fault and return.
Because the return value from an SPI command is actually returned in the subsequent message, main-loop software that tries
to read SR1, SR2 or SR3, may experience an interrupt between sending the SPI command and the subsequent read. Thus if
these registers are to be read, special care must be taken in the software to ensure that the correct results are being interpreted.
1. Interrupt Service Routine:
1.1. Disable further interrupts from the 33937
1.2. Clear semaphore set in 1.2.1 of Main loop. This indicates to the main loop that an interrupt occurred and that the
return value it gets may not be as expected.
1.3. Send NULL0 Command. Ignore return value (the previous command is unknown)
1.4. Send NULL0 Command. The return value will be SR0 from the previous NULL0 command
2. Process Bits in SR0 and correct any faults
3. Send CLINT0 command to clear known (i.e. processed faults from SR0) faults 0:3
4. Send CLINT1 command to clear processed faults 4:7. Note, the return SR0 register from this command is actually read in
the main routine.
5. Re-enable interrupts from the 33937
Analog Integrated Circuit Device Data
Freescale Semiconductor
33937
39