[bsp][CV1800B] fix cv1800b polarity reversal error

Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
This commit is contained in:
Jingbao Qiu 2024-03-18 20:04:03 +08:00 committed by Meco Man
parent 90f86c2b71
commit 42e8191b34
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ static void cvi_pwm_set_config(rt_ubase_t reg_base, struct rt_pwm_configuration
{
unsigned long long duty_clk, period_clk;
cvi_pwm_set_polarity_low_ch(reg_base, (cfg->channel & PWM_MAX_CH));
cvi_pwm_set_polarity_high_ch(reg_base, (cfg->channel & PWM_MAX_CH));
duty_clk = (cfg->pulse * count_unit) / NSEC_COUNT;
cvi_pwm_set_high_period_ch(reg_base, (cfg->channel & PWM_MAX_CH), duty_clk);