mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
mcpwm: update bldc example
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
| Supported Targets | ESP32 |
|
| Supported Targets | ESP32 | ESP32-S3 |
|
||||||
| ----------------- | ----- |
|
| ----------------- | ----- | -------- |
|
||||||
|
|
||||||
# MCPWM BLDC motor control (hall sensor feedback) Example
|
# MCPWM BLDC motor control (hall sensor feedback) Example
|
||||||
|
|
||||||
This example will show you how to use MCPWM module to control bldc motor with hall sensor feedback
|
This example will show you how to use MCPWM module to control BLDC motor with hall sensor feedback.
|
||||||
|
|
||||||
The following examples uses MCPWM module to control bldc motor and vary its speed continuously
|
The following examples uses MCPWM module to control bldc motor and vary its speed continuously
|
||||||
|
|
||||||
|
@@ -215,7 +215,7 @@ static void mcpwm_example_bldc_control(void *arg)
|
|||||||
//2. initial mcpwm configuration
|
//2. initial mcpwm configuration
|
||||||
printf("Configuring Initial Parameters of mcpwm bldc control...\n");
|
printf("Configuring Initial Parameters of mcpwm bldc control...\n");
|
||||||
mcpwm_config_t pwm_config;
|
mcpwm_config_t pwm_config;
|
||||||
pwm_config.frequency = 1000; //frequency = 1000Hz
|
pwm_config.frequency = 14400; //frequency = 1000Hz
|
||||||
pwm_config.cmpr_a = 50.0; //duty cycle of PWMxA = 50.0%
|
pwm_config.cmpr_a = 50.0; //duty cycle of PWMxA = 50.0%
|
||||||
pwm_config.cmpr_b = 50.0; //duty cycle of PWMxb = 50.0%
|
pwm_config.cmpr_b = 50.0; //duty cycle of PWMxb = 50.0%
|
||||||
pwm_config.counter_mode = MCPWM_UP_COUNTER;
|
pwm_config.counter_mode = MCPWM_UP_COUNTER;
|
||||||
|
Reference in New Issue
Block a user