Kconfig Options - lists the supported Kconfig options that can bring different effects to the driver. Set the level to -1 means to disable the force action, and the generators output level will be controlled by the event actions again. Los motores de CC se utilizan ampliamente en el campo de la servoautomatizacin y la robtica. If you have some function that should be called when particular event happens, you should hook your function to the interrupt service routine by calling mcpwm_timer_register_event_callbacks(). It works very much similar to servo motors, the provided PWM signal should have a period of 20ms and the duty cycle can be varied to vary the speed of the BLDC motor. Group of supported MCPWM compare event callbacks. One generator can set multiple actions on different timer events, by calling mcpwm_generator_set_actions_on_timer_event() with variable number of action configurations. Try to make the operator recover from fault. MCPWM timer commands, specify the way to start or stop the timer. This function will lazy install interrupt service for the MCPWM fault, whereas the service can only be removed in mcpwm_del_fault. groups, timers, comparators, operators, generators and so on). The two MOSFETs on the same arm cant conduct at the same time, otherwise there will be a short circuit. However, the driver can prevent the system from changing APB frequency by acquiring a power management lock of type ESP_PM_APB_FREQ_MAX. The active level of the waveform pair is determined by the level of the PWM with a smaller duty cycle. Coupling of non alternating signals with a transformer is problematic, so the signals are modulated by the carrier submodule to create an AC waveform, to make the coupling possible. ev_act [in] MCPWM timer event action list, must be terminated by MCPWM_GEN_TIMER_EVENT_ACTION_END(), ESP_OK: Set generator actions successfully, ESP_ERR_INVALID_ARG: Set generator actions failed because of invalid argument, ESP_ERR_INVALID_STATE: Set generator actions failed because of timer is not connected to operator, ESP_FAIL: Set generator actions failed because of other error. You can also set the brake action one by one by calling mcpwm_generator_set_action_on_brake_event() without varargs. For example, in the BLDC (Brushless DC, see figure below) scenario, we can use the capture submodule to sense the rotor position from Hall sensor. CONFIG_MCPWM_ENABLE_DEBUG_LOG is used to enabled the debug log output. Otherwise, it will return error code. Specifically, when there are no more free GPIO faults in the MCPWM group, this function will return ESP_ERR_NOT_FOUND error. The capture consists one dedicated timer and several independent channels. In the circuit there are 2 pushbuttons, one is used to increase BLDC motor speed and the 2nd one is used to decrease it. It is for debugging purposes only. Set to NULL will disable the timer being synced by others, The count value that should lock to upon sync event, The count direction that should lock to upon sync event, components/driver/mcpwm/include/driver/mcpwm_oper.h, config [in] MCPWM operator configuration, ret_oper [out] Returned MCPWM operator handle, ESP_OK: Create MCPWM operator successfully, ESP_ERR_INVALID_ARG: Create MCPWM operator failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM operator failed because out of memory, ESP_ERR_NOT_FOUND: Create MCPWM operator failed because cant find free resource, ESP_FAIL: Create MCPWM operator failed because of other error, oper [in] MCPWM operator, allocated by mcpwm_new_operator(), ESP_OK: Delete MCPWM operator successfully, ESP_ERR_INVALID_ARG: Delete MCPWM operator failed because of invalid argument, ESP_FAIL: Delete MCPWM operator failed because of other error. Software fault object can be used to trigger a fault by calling a function mcpwm_soft_fault_activate() instead of waiting for a real fault signal on the GPIO. Whenever the driver creates a MCPWM timer instance that has selected MCPWM_TIMER_CLK_SRC_PLL160M as its clock source, the driver will guarantee that the power management lock is acquired when enable the timer by mcpwm_timer_enable(). About this item. The Arduino, ESP8266 or ESP32 microcontroller provide the power supply for the DC motor. Activate the software fault, trigger the fault event for once. The dead-time driver works like a decorator, which is also reflected in the function parameters of mcpwm_generator_set_dead_time(), where it takes the primary generator handle (in_generator), and returns a generator (out_generator) after applying the dead-time. This system controls the BLDC motor speed more efficiently and precisely as compared to other systems. Otherwise, it will return error code. NPN transistor: Because we want to turn the DC motor on by setting the digital pin of the microcontroller HIGH. There is another Kconfig option CONFIG_MCPWM_CTRL_FUNC_IN_IRAM that can put commonly used IO control functions into IRAM as well. I'm trying to figure out how to control the speed of a 400-watt, 3000RPM, 48V BLDC with Hall sensors with a Raspberry Pi 3. Control DC Motor with PID Controller using MATLAB/Simulink and Waijung 2 for ESP32 Aimagin: Control DC Motor with PID Controller using MATLAB/Simulink and Waijung 2 for ESP32 JavaScript seems to be disabled in your browser. The supported directions are listed in mcpwm_timer_direction_t. You can set the sync phase by calling mcpwm_timer_set_phase_on_sync(). Enough for a controller. esp32 support Esp32 boards support MCPWM interface that is intended for this kind of applications. Help macros to construct a mcpwm_gen_timer_event_action_t entry. This section will demonstrate the classical PWM waveforms that can be generated by the pair of the generators. These objects are the basis of the following IO setting and control functions. Synchronization - describes how to synchronize the MCPWM timers and get a fixed phase difference between the generated PWM signals. You should call mcpwm_capture_channel_enable() and mcpwm_capture_channel_disable() accordingly to enable or disable the channel. On the contrary, calling mcpwm_del_comparator() function will free the allocated comparator object. The ID should belong to [0, SOC_MCPWM_GROUPS - 1] range. Note that all grounded terminals are connected together. MCPWM comparator event callback function. See MCPWM Comparators for how to allocate a comparator. MCPWM Sync: The sync module is used to synchronize the MCPWM timers, so that the final PWM signals generated by different MCPWM generators can have a fixed phase difference. Sensored 3-Phase BLDC Motor Control Using MSP430: 20 Jul 2011: Design & development. Group of supported MCPWM fault event callbacks. Power source to drive the motor (LiPo battery) DESCRIPTION: Brushless motors have much more satisfying results as compared to brushed motors. 1. By default, driver will reset the GPIO pin at exit. Based on my previous design replacing PSOC4 with an ESP-32 WROOM-32D Module. This closed loop control for BLDC motor system could be used in drilling machines, lath machines, spinning machines, elevators and electric bikes. The motor turns on reliably at about 1050 with very low rpms, and runs up to a measured 8650 rpm at 1400. Although the software fault and GPIO fault are of different types, but the returned fault handle is of the same type. The MCPWM peripheral is a versatile PWM generator, which contains various submodules to make it a key element in power electronic applications like motor control, digital power and so on. BLDC Controller using STM32 and DRV8301 | All About Circuits Home Forums Embedded & Programming Microcontrollers BLDC Controller using STM32 and DRV8301 KranthiKumarR May 7, 2021 Search Forums New Posts K Thread Starter KranthiKumarR Joined Aug 27, 2017 18 May 7, 2021 #1 Hello everyone, I have built a hardware similar to VESC by Benjamin Vedder. callback function when mcpwm operator brakes in CBC, callback function when mcpwm operator brakes in OST, The duration of the first PWM pulse, in us, components/driver/mcpwm/include/driver/mcpwm_cmpr.h, oper [in] MCPWM operator, allocated by mcpwm_new_operator(), the new comparator will be allocated from this operator, config [in] MCPWM comparator configuration, ret_cmpr [out] Returned MCPWM comparator, ESP_OK: Create MCPWM comparator successfully, ESP_ERR_INVALID_ARG: Create MCPWM comparator failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM comparator failed because out of memory, ESP_ERR_NOT_FOUND: Create MCPWM comparator failed because cant find free resource, ESP_FAIL: Create MCPWM comparator failed because of other error, cmpr [in] MCPWM comparator handle, allocated by mcpwm_new_comparator(), ESP_OK: Delete MCPWM comparator successfully, ESP_ERR_INVALID_ARG: Delete MCPWM comparator failed because of invalid argument, ESP_FAIL: Delete MCPWM comparator failed because of other error. The operator handle is created by mcpwm_new_operator()(). It is less costly as compared to other systems. mcpwm_generator_set_actions_on_timer_event(). Otherwise, it will return error code. MCPWM Capture: This is a standalone submodule which can work even without the above MCPWM operators. The supported timer events are listed in mcpwm_timer_event_t. With a comprehensive range of BLDC motor controller IC products, Infineon offers a complete MOTIX BLDC motor system IC that is one of the first systems in the world to combine integrated power supply, CAN FD, and LIN functionality for both DC and BLDC motor controllers. We'll discuss today about the H Bridge, and how to control the speed of a DC motor with an ESP32 LoRa with display. mcpwm_operator_config_t::update_dead_time_on_tez sets whether to update the dead time when the timer counts to zero. Thread Safety - lists which APIs are guaranteed to be thread safe by the driver. The mcpwm_new_comparator() will return a pointer to the allocated comparator object if the allocation succeeds. It is a highly versatile and low-cost solution for many applications, including Internet of Things (IoT) projects, home automation, and robotics. BLDC_COMPRESSOR_TCC_DA_HORIZONTAL_r1.0 (1) Uploaded by Bruno Souza. out_resolution [out] Returned capture timer resolution, in Hz, ESP_OK: Get capture timer resolution successfully, ESP_ERR_INVALID_ARG: Get capture timer resolution failed because of invalid argument, ESP_FAIL: Get capture timer resolution failed because of other error, config [in] MCPWM capture timer sync phase configuration, ESP_OK: Set sync phase for MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Set sync phase for MCPWM capture timer failed because of invalid argument, ESP_FAIL: Set sync phase for MCPWM capture timer failed because of other error, The created capture channel wont be enabled until calling mcpwm_capture_channel_enable, cap_timer [in] MCPWM capture timer, allocated by mcpwm_new_capture_timer(), will be connected to the new capture channel, config [in] MCPWM capture channel configuration, ret_cap_channel [out] Returned MCPWM capture channel, ESP_OK: Create MCPWM capture channel successfully, ESP_ERR_INVALID_ARG: Create MCPWM capture channel failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM capture channel failed because out of memory, ESP_ERR_NOT_FOUND: Create MCPWM capture channel failed because cant find free resource, ESP_FAIL: Create MCPWM capture channel failed because of other error, cap_channel [in] MCPWM capture channel handle, allocated by mcpwm_new_capture_channel(), ESP_OK: Delete MCPWM capture channel successfully, ESP_ERR_INVALID_ARG: Delete MCPWM capture channel failed because of invalid argument, ESP_FAIL: Delete MCPWM capture channel failed because of other error. Make sure the MCPWM timer and operator are in the same group, otherwise, this function will return ESP_ERR_INVALID_ARG error. It is friendly to use no need of any expert person. Otherwise, it will return error code ESP_ERR_INVALID_STATE. I have tried many combinations but the motor is not rotating. Here using a motor driver L293D. On the contrary, calling mcpwm_del_timer() function will free the allocated timer object. Before doing IO control to the timer, user needs to enable the timer first, by calling mcpwm_timer_enable(). The parameter user_data of mcpwm_comparator_register_event_callbacks() function is used to save users own context, it will be passed to the callback function directly. Currently this configuration structure is left for future purpose. On one side the ESC has three wires that control the three phases of the motor and on the other side it has two wires, VCC and GND, for powering. Job Description: I need to implement an existing project (AVR194 application note) to work with my setup. The callback function prototype is declared in mcpwm_brake_event_cb_t. I specifically like the car glass engine, as it consumes a reasonable current of around 2 amps. Specifically, when there are no more free generators in the MCPWM operator, this function will return ESP_ERR_NOT_FOUND error. This capability is mandatory if you need pulse transformer-based gate drivers to control the power switching elements. I'll introduce you to an H-bridge speed control using MOSFET, and then we'll apply that control to an engine to evaluate its behavior. Please note, if the out_generator and in_generator are the same, it means were adding the time delay to the PWM waveform in a in-place fashion. Send specific start/stop commands to MCPWM timer. V1, V3, V5 and V2, V4, V6 make a 3-phase voltage source inverter connected across the power supply. MCPWM Operator: The key module that is responsible for generating the PWM waveforms. The action configuration is defined in mcpwm_gen_brake_event_action_t: mcpwm_gen_brake_event_action_t::direction specific the timer direction. To allocate a GPIO fault object, you can call mcpwm_new_gpio_fault() function, with configuration structure mcpwm_gpio_fault_config_t as the parameter. Extra configuration flags for capture channel. mcpwm_capture_timer_config_t::clk_src sets the clock source of the capture timer. So, these functions can also be executable when the cache is disabled. Once the fault signal is active, MCPWM Operator will force all the generators into a predefined state, to protect the system from damage. And will release the lock in mcpwm_capture_timer_disable(). Likewise, the MCPWM capture timer MCPWM Capture Timer can be synced as well. Classical PWM Waveforms and Generator Configurations - demonstrates some classical PWM waveforms that can be achieved by configuring generator actions. Controlling DC Motor Speed and Direction using L293D Motor Driver IC Open your Arduino IDE and go to File > New. A simple BLDC motor control algorithm for low cost motor drive applications using general purpose microcontrollers has been created and presented in this paper. It is for debugging purposes only. Enable this option will increase the firmware binary size. The PWM signals controlling the speed of DC motor. The callback function prototype is declared in mcpwm_compare_event_cb_t. User can deregister a previously registered callback by calling this function and setting the callback member in the cbs structure to NULL. User has to call mcpwm_operator_recover_from_fault() to manually recover it. NXP Semiconductors Motor control application tasks Motor Control Using FreeRTOS, Rev. Set generator actions on multiple MCPWM timer events. The MCPWM comparator can inform the user when the timer counter equals to the compare value. It enables both the GPIOs input and output ability through the GPIO matrix peripheral. Contents About Wishlist Using Releases About This library is for control motors with MCPWM of ESP32 board. The supported actions are listed in mcpwm_generator_action_t. Therere a few points to note: New compare value might wont take effect immediately. Before doing IO control to the capture timer, user needs to enable the timer first, by calling mcpwm_capture_timer_enable(). You have to register a callback function to get the timer count value of the capture moment, by calling mcpwm_capture_channel_register_event_callbacks(). . The code snippet that is used to generate the waveforms is also provided below the diagram. Apply carrier feature for MCPWM operator. The configuration structure is defined as: mcpwm_operator_config_t::group_id specifies the MCPWM group ID. Diseo de control de motores BLDC - EEWeb. mcpwm_gpio_sync_src_config_t::active_neg sets whether the sync signal is active on falling edge. See also Power management for more information. acquire a proper power management lock if a specific clock source (e.g. MCPWM capture timer configuration structure. ev_act [in] MCPWM timer event action, can be constructed by MCPWM_GEN_TIMER_EVENT_ACTION helper macro, ESP_OK: Set generator action successfully, ESP_ERR_INVALID_ARG: Set generator action failed because of invalid argument, ESP_ERR_INVALID_STATE: Set generator action failed because of timer is not connected to operator, ESP_FAIL: Set generator action failed because of other error. In turn, if the out_generator and in_generator are different, it means were deriving a new PWM waveform from the existing in_generator. DFR0478 FireBeetle ESP32 IOT Microcontroller (V3.0) Supports Wi-Fi & Bluetooth DFR0483 FireBeetle Covers-Gravity I O Expansion Shield FireBeetle Covers-248 LED Matrix TEL0121 FireBeetle Covers-LoRa Radio 433MHz TEL0122 FireBeetle Covers-LoRa Radio 915MHz TEL0125 FireBeetle Covers LoRa Radio 868MHz DFR0489 FireBeetle ESP8266 IOT Microcontroller Each submodule has its own resource allocation, which is described in the following sections. A software fault object can be allocated by calling mcpwm_new_soft_fault() function, with configuration structure mcpwm_soft_fault_config_t as the parameter. For industrial usage Infineon adds to the 3-phase brushless DC motor . BLDC motor rotates continuously. The MOTIX 6ED2742S01Q is a 160 V SOI based gate driver designed for three phase BLDC motor drive applications. Generator Force Actions - describes how to control the generator output level asynchronously in a forceful way. Calling mcpwm_timer_start_stop() with different mcpwm_timer_start_stop_cmd_t commands can start the timer immediately or stop the timer at a specific event. Internally, this function will: switch the capture timer state from init to enable. The connection diagram to control a DC motor from the ESP32 using an ULN2803A can be seen below at figure 1. ISR callback function that would be invoked when fault signal becomes active, ISR callback function that would be invoked when fault signal becomes inactive, components/driver/mcpwm/include/driver/mcpwm_sync.h, config [in] MCPWM timer sync source configuration, ret_sync [out] Returned MCPWM sync handle, ESP_OK: Create MCPWM timer sync source successfully, ESP_ERR_INVALID_ARG: Create MCPWM timer sync source failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM timer sync source failed because out of memory, ESP_ERR_INVALID_STATE: Create MCPWM timer sync source failed because the timer has created a sync source before, ESP_FAIL: Create MCPWM timer sync source failed because of other error, config [in] MCPWM GPIO sync source configuration, ret_sync [out] Returned MCPWM GPIO sync handle, ESP_OK: Create MCPWM GPIO sync source successfully, ESP_ERR_INVALID_ARG: Create MCPWM GPIO sync source failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM GPIO sync source failed because out of memory, ESP_ERR_NOT_FOUND: Create MCPWM GPIO sync source failed because cant find free resource, ESP_FAIL: Create MCPWM GPIO sync source failed because of other error, config [in] MCPWM software sync source configuration, ret_sync [out] Returned software sync handle, ESP_OK: Create MCPWM software sync successfully, ESP_ERR_INVALID_ARG: Create MCPWM software sync failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM software sync failed because out of memory, ESP_FAIL: Create MCPWM software sync failed because of other error, sync [in] MCPWM sync handle, allocated by mcpwm_new_timer_sync_src() or mcpwm_new_gpio_sync_src() or mcpwm_new_soft_sync_src(), ESP_OK: Delete MCPWM sync source successfully, ESP_ERR_INVALID_ARG: Delete MCPWM sync source failed because of invalid argument, ESP_FAIL: Delete MCPWM sync source failed because of other error. 3Phase Motor ABOUT ActivePFC Article Balancing Battery BLDC Motor Current sensor DC Motor DC-DC Converter Download ESP32 NodeMCU ESP8266 NodeMCU IC Switching Induction Heat Inverter 220VAC IPM 3Phase PCB Design PID Control Projects . The ESP32 microcontroller is an advanced system on a chip that combines WiFi and Bluetooth capabilities with a powerful microcontroller and processing unit. Calling mcpwm_capture_timer_start() can start the timer and calling mcpwm_capture_timer_stop() can stop the timer immediately. Likewise, the driver releases the lock when mcpwm_timer_disable() is called for that timer. New. MCPWM Generator: One MCPWM generator can generate a pair of PWM waves, complementarily or independently, based on various events triggered from other submodules like MCPWM Timer, MCPWM Comparator. 449 sold. BLDC Motor speed control from washing machine by Arduino UNO (3,680) Creative PCB Design. The callback function prototype is declared in mcpwm_timer_event_cb_t. V1 is high side, which is connected to the high voltage DC source while V4 is low side, which is connected to ground. If the interrupt service is lazy installed during registering event callbacks for the channel in mcpwm_capture_channel_register_event_callbacks(), mcpwm_capture_channel_enable() will enable the interrupt service as well. Otherwise, it will return error code. Set generator action on MCPWM brake event. The supported directions are listed in mcpwm_timer_direction_t. The configuration structure is defined as: mcpwm_capture_timer_config_t::group_id sets the MCPWM group ID. Evaluation board. mcpwm_timer_config_t::resolution_hz set the expected resolution of the timer, the driver internally will set a proper divider based on the clock source and the resolution. 2. Help macros to construct a mcpwm_gen_brake_event_action_t entry. $9.86. fault [in] MCPWM soft fault, allocated by mcpwm_new_soft_fault(), ESP_OK: Trigger MCPWM software fault event successfully, ESP_ERR_INVALID_ARG: Trigger MCPWM software fault event failed because of invalid argument, ESP_FAIL: Trigger MCPWM software fault event failed because of other error, fault [in] MCPWM GPIO fault handle, allocated by mcpwm_new_gpio_fault(). mcpwm_capture_channel_config_t::pull_up and mcpwm_capture_channel_config_t::pull_down set whether to pull up and/or pull down the GPIO internally. Arduino Sketch This basic sketch will show us how to control a DC motor's speed and direction of rotation using the L293D motor driver IC. There are things that I do not need and things I want to be added. Our proven expertise in development of advanced algorithms like FOC, Field-weakening and regenerative braking ensures substantially reduced turn-around time for your EV program. mcpwm_timer_event_callbacks_t::on_stop sets callback function for timer when it is stopped. Each bridge arm has two power electronic devices, such as MOSFET, IGBT, etc. Carrier Modulation: The carrier submodule allows a high-frequency carrier signal to modulate the PWM waveforms generated by the generator and dead time submodules. The basic IO operation of a capture timer is to start and stop. Timer Operations and Events - describes control functions and event callbacks that supported by the MCPWM timer. The capture timer is usually connected with several capture channels, please refer to MCPWM Capture Timer and Channels for resource allocation. It enables both the GPIOs input and output ability through the GPIO matrix peripheral. mcpwm_new_soft_sync_src() will return a pointer to the allocated sync source object if the allocation succeeds. 1. Please note, the argument list of mcpwm_generator_set_actions_on_compare_event() must be terminated by MCPWM_GEN_COMPARE_EVENT_ACTION_END. Specifically, if this is set to NULL, the driver will disable the sync feature for the MCPWM capture timer. Carrier Modulation - describes how to set modulate a high frequency onto the final PWM waveforms. If you have some function that should be called when such event happens, you should hook your function to the interrupt service routine by calling mcpwm_fault_register_event_callbacks(). If the hold_on is true, the force level will retain forever, until user removes the force level by setting the force level to -1. Speed Control of DC Motor using Arduino. The flip side of the three-level BLDC driver circuit is that it requires six MCU outputs. PLL_160M clock) is selected. The capture timer is connected with several independent channels, each channel is assigned with a GPIO. DRV8316 + ESP32: FOC BLDC motor controller - YouTube 0:00 / 1:07 DRV8316 + ESP32: FOC BLDC motor controller Gadget Workbench 2.69K subscribers Subscribe 95 6.4K views 1 year ago. I've been able to find information where people will us an ESC like this between their rPi and the motor but these seem to always be connected to small motors like airplane motors and not the one like what I have. ESP32MotorControl Motor control using ESP32 MCPWM A library to ESP32 control motors using MCPWM Works only with ESP32. Document Information enable the interrupt service if it has been lazy installed by mcpwm_timer_register_event_callbacks(). This function will lazy install interrupt service for the MCPWM timer without enabling it. mcpwm_timer_sync_phase_config_t::count_value sets the count value to load when the sync signal is taken. Set event callbacks for MCPWM capture channel. All supported event callbacks are listed in the mcpwm_fault_event_callbacks_t: mcpwm_fault_event_callbacks_t::on_fault_enter sets callback function that will be called when a fault is detected. The callback function is called within the ISR context, so is should not attempt to block (e.g., make sure that only FreeRTOS APIs with ISR suffix is called within the function). Artificial Neural Network (ANN) controllers with an improved control law is designed and implemented in this work using cheap and efficient microcontroller, the ESP32. mcpwm_operator_config_t::update_dead_time_on_tep sets whether to update the dead time when the timer counts to peak. The allocated MCPWM Timer should be connected with a MCPWM operator by calling mcpwm_operator_connect_timer(), so that the operator can take that timer as its time base, and generate the required PWM waves. The way that MCPWM operator reacts to the fault is called Brake. Each ep32 board has two of the MCPWM channels and can support two 6PWM drivers. Group of supported MCPWM operator event callbacks. mcpwm_gpio_fault_config_t::active_level sets the active level of the fault signal. Set event callbacks for MCPWM comparator. Connect MCPWM operator and timer, so that the operator can be driven by the timer. components/driver/mcpwm/include/driver/mcpwm_cap.h, config [in] MCPWM capture timer configuration, ret_cap_timer [out] Returned MCPWM capture timer handle, ESP_OK: Create MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Create MCPWM capture timer failed because of invalid argument, ESP_ERR_NO_MEM: Create MCPWM capture timer failed because out of memory, ESP_ERR_NOT_FOUND: Create MCPWM capture timer failed because cant find free resource, ESP_FAIL: Create MCPWM capture timer failed because of other error, cap_timer [in] MCPWM capture timer, allocated by mcpwm_new_capture_timer(), ESP_OK: Delete MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Delete MCPWM capture timer failed because of invalid argument, ESP_FAIL: Delete MCPWM capture timer failed because of other error, cap_timer [in] MCPWM capture timer handle, allocated by mcpwm_new_capture_timer(), ESP_OK: Enable MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Enable MCPWM capture timer failed because of invalid argument, ESP_ERR_INVALID_STATE: Enable MCPWM capture timer failed because timer is enabled already, ESP_FAIL: Enable MCPWM capture timer failed because of other error, ESP_OK: Disable MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Disable MCPWM capture timer failed because of invalid argument, ESP_ERR_INVALID_STATE: Disable MCPWM capture timer failed because timer is disabled already, ESP_FAIL: Disable MCPWM capture timer failed because of other error, ESP_OK: Start MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Start MCPWM capture timer failed because of invalid argument, ESP_FAIL: Start MCPWM capture timer failed because of other error, ESP_OK: Stop MCPWM capture timer successfully, ESP_ERR_INVALID_ARG: Stop MCPWM capture timer failed because of invalid argument, ESP_FAIL: Stop MCPWM capture timer failed because of other error.