Driver API for Motion Interface.
The functions and other declarations used in this part of the driver are in cy_tcpwm_motif.h. You can also include cy_pdl.h to get access to all functions and declarations in the PDL.
The MOTIF unit is a flexible and powerful component for motor control systems that use Rotary Encoders, Hall Sensors as feedback loop. The several configuration schemes of the module, target a very large universe of motor control application requirements. This enables the build of simple and complex control feedback loops, for industrial and automotive motor applications, targeting high performance motion and position monitoring.
Each MOTIF module can operate in four different modes,
The MOTIF module has the following features:
The QuadDec configuration can be divided to number of sequential steps listed below:
To configure MOTIF module in HALL Sensor mode, Quadrature mode, Multi Channel Pattern mode provide the configuration parameters in the cy_stc_tcpwm_motif_hall_sensor_config_t structure for Hall Sensor Mode. cy_stc_tcpwm_motif_mcp_config_t structure for Multi Channel Pattern Mode. cy_stc_tcpwm_motif_quaddec_config_t structure for Quadrature Mode. The Configuration structure can be modified through software, but if the configurator in ModusToolbox is used then the configuration structure will be updated with the users input. To initialize the driver, call Cy_TCPWM_MOTIF_Hall_Sensor_Init Cy_TCPWM_MOTIF_MCP_Init Cy_TCPWM_MOTIF_Quaddec_Init function providing a pointer to the populated cy_stc_tcpwm_motif_hall_sensor_config_t cy_stc_tcpwm_motif_mcp_config_t cy_stc_tcpwm_motif_quaddec_config_t structures respectively.
The clock source must be connected to proper working. Any of the peripheral clock dividers could be used. Use the SysClk (System Clock) driver API to do that.
MOTIF block has to be enabled before starting
MOTIF has to be started
API Reference | |
Macros | |
Functions | |
HALL Sensor specific functions | |
Multi-Channel specific functions | |
Quadrature decoder specific functions | |
Data Structures | |