Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MC33927.c File Reference

MC33927 routines on the board 00336_01. More...

#include "MC33927.h"

Functions

byte SPI_Send (byte)
 
void MC33927_GetSR0 (MC33927_LATCH_T *pudtSR0)
 Reads Status Register 0 from MC33927. More...
 
void MC33927_GetSR1 (MC33927_MODE_T *pudtSR1)
 Reads Status Register 1 from MC33927. More...
 
void MC33927_GetSR2 (MC33927_LATCH_T *pudtSR2)
 Reads Status Register 2 from MC33927. More...
 
byte MC33927_GetSR3 (void)
 Reads Status Register 3 from MC33927. More...
 
void MC33927_ModeCommand (MC33927_MODE_COMMAND_T *pudtModeCommand)
 Set modes on MC33927. More...
 
void MC33927_MaskInterrupts (MC33927_LATCH_T *pudtInterruptMask)
 Set modes on MC33927. More...
 
void MC33927_ClearFlags (MC33927_LATCH_T *pudtClearFlags)
 Clear flags on MC33927. More...
 
void MC33927_ZeroDeadtime (void)
 Set zero deadtime on MC33927. More...
 
void MC33927_DeadtimeCalibration (void)
 Enter the deadtime calibration mode on MC33927. More...
 

Detailed Description

Author
R61928
Version
1.0.1.0
Date
Sep-16-2013

MC33927 routines on the board 00336_01 plugged on 00315_01.

Function Documentation

void MC33927_ClearFlags ( MC33927_LATCH_T pudtClearFlags)
Parameters
ptrMC33927_MODE_COMMAND_T * pudtClearFlags
  • pointer to the clear flags structure
Returns
N/A
Remarks
The function clears the flag bits on MC33927 corresponding to the structure the pudtClearFlags pointer points to.
void MC33927_DeadtimeCalibration ( void  )
Remarks
The function sets MC33927 to enter the deadtime calibration mode. The driver will ignore any commands sent to it after this function called. To calibrate the deadtime follow these steps:
  1. Call this function
  2. Set the /CS pin of MC33927 to logical low
  3. Apply delay loop 16x longer than the desired deadtime
  4. Set the /CS pin of MC33927 to logical high

Now the deadtime is set. After reset the deadtime is set to 15us!

void MC33927_GetSR0 ( MC33927_LATCH_T pudtSR0)
Parameters
ptrMC33927_LATCH_T * pudtSR0
  • pointer to the Status Register 0 structure
Returns
N/A
Remarks
The function sends the command to read Status Register 0 from MC33927.
void MC33927_GetSR1 ( MC33927_MODE_T pudtSR1)
Parameters
ptrMC33927_LATCH_T * pudtSR1
  • pointer to the Status Register 1 structure
Returns
N/A
Remarks
The function sends the command to read Status Register 1 from MC33927.
void MC33927_GetSR2 ( MC33927_LATCH_T pudtSR2)
Parameters
ptrMC33927_LATCH_T * pudtSR2
  • pointer to the Status Register 2 structure
Returns
N/A
Remarks
The function sends the command to read Status Register 2 from MC33927.
byte MC33927_GetSR3 ( void  )
Returns
deadtime value
Remarks
The function sends the command to read Status Register 3 from MC33927. The return of this function is the deadtime 8-bit value, 255 corresponds to 15us.
void MC33927_MaskInterrupts ( MC33927_LATCH_T pudtInterruptMask)
Parameters
ptrMC33927_MODE_COMMAND_T * pudtModeCommand
  • pointer to the mode command structure
Returns
N/A
Remarks
The function sets the mode bits of MASK0 and MASK1 on MC33927 corresponding to the structure the pudtInterruptMask pointer points to.
void MC33927_ModeCommand ( MC33927_MODE_COMMAND_T pudtModeCommand)
Parameters
ptrMC33927_MODE_COMMAND_T * pudtModeCommand
  • pointer to the mode command structure
Returns
N/A
Remarks
The function sets the mode bits MC33927 corresponding to the structure the pudtModeCommand pointer points to.
void MC33927_ZeroDeadtime ( void  )
Remarks
The function sets the zero deadtime on MC33927. Be sure a deadtime is properly generated by the PWM peripheral of the processor.
byte SPI_Send ( byte  )