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.h File Reference

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

Go to the source code of this file.

Data Structures

union  MC33927_LATCH_T
 
union  MC33927_MODE_T
 
union  MC33927_MODE_COMMAND_T
 
struct  MC33927_LATCH_T.B
 
struct  MC33927_MODE_T.B
 
struct  MC33927_MODE_COMMAND_T.B
 

Macros

#define byte
 
#define STATUS_REGISTER_0
 
#define STATUS_REGISTER_1
 
#define STATUS_REGISTER_2
 
#define STATUS_REGISTER_3
 
#define MODE_COMMAND
 
#define MODE_COMMAND_MASK
 
#define MC33927_MASK0
 
#define MC33927_MASK1
 
#define CLINT0
 
#define CLINT1
 
#define ZERO_DEADTIME
 
#define DEADTIME_CALIBRATION
 

Functions

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.


Data Structure Documentation

union MC33927_LATCH_T
Data Fields
struct MC33927_LATCH_T B
byte W8
union MC33927_MODE_T
Data Fields
struct MC33927_MODE_T B
byte W8
union MC33927_MODE_COMMAND_T
Data Fields
struct MC33927_MODE_COMMAND_T B
byte W8
struct MC33927_LATCH_T.B
Data Fields
byte Desat: 1
byte FramingError: 1
byte LowVLS: 1
byte Overcurrent: 1
byte PhaseError: 1
byte ResetEvent: 1
byte TLim: 1
byte WriteError: 1
struct MC33927_MODE_T.B
Data Fields
byte Bit2: 1
byte Bit7: 1
byte CalibrationOverflow: 1
byte DeadtimeCalibration: 1
byte DesatMode: 1
byte FullOnMode: 1
byte Lock: 1
byte ZeroDeadtime: 1
struct MC33927_MODE_COMMAND_T.B
Data Fields
byte Bit2: 1
byte Bit4: 1
byte Bit5: 1
byte Bit6: 1
byte Bit7: 1
byte DesatFaultMode: 1
byte FullOnMode: 1
byte Lock: 1

Macro Definition Documentation

#define byte
#define CLINT0
#define CLINT1
#define DEADTIME_CALIBRATION
#define MC33927_MASK0
#define MC33927_MASK1
#define MODE_COMMAND
#define MODE_COMMAND_MASK
#define STATUS_REGISTER_0
#define STATUS_REGISTER_1
#define STATUS_REGISTER_2
#define STATUS_REGISTER_3
#define ZERO_DEADTIME

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.