mcpwm: update bldc example

This commit is contained in:
suda-morris
2021-07-26 22:22:41 +08:00
parent 251afb4a79
commit 039cb93787
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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;