iLLD_TC27xC
1.0
|
![]() |
The PWMBC interface driver provides a default CCU6 configuration specifically for running a Brush Less DC Motor using hall sensor inputs, by utilising both the timers
After evaluating the hall input pattern at every T13 period match, new out pattern is given to the module after the phase delay at the T13 zero match
User has to prepare the control table for the respective motor he/she is using,
In the following sections it will be described, how to integrate the driver into the application framework.
Include following header file into your C code:
Declare the PWMBC handle and the motor control table as global variables in your C code:
See also How to define Interrupts?
Define priority for the Interrrupt handler. This is normally done in the Ifx_IntPrioDef.h file:
Add the interrupt service routine to your C code.
Finally install the interrupt handlers in your initialisation function:
The module initialisation can be done in the same function. Here an example:
The PwmBc is ready for use now!
The PWMBC driver provides simple to use Motor Control functions
This means: you can start, stop, the BLDC motor once the module is initialised with the appropriate configuration You can optionally get the speed of the motor at any point of time
Start the motor
Stop the motor
Update the output pattern
Get the current motor speed (can also be called in ISR)