Обновление
This commit is contained in:
parent
7e689c0162
commit
0bfa1f70b2
|
|
@ -44,7 +44,7 @@ void Get_Set_Tpu_PwmCallback(tPwmFlagchip *env);
|
||||||
|
|
||||||
#define TPU_FREQ (BUS_CLK / SCG_CLK_DIV)
|
#define TPU_FREQ (BUS_CLK / SCG_CLK_DIV)
|
||||||
|
|
||||||
#define PWM_FREQ 50 // 100 Hz
|
#define PWM_FREQ 100 // 100 Hz
|
||||||
|
|
||||||
#define PERIOD_TICKS (TPU_FREQ / PWM_FREQ)
|
#define PERIOD_TICKS (TPU_FREQ / PWM_FREQ)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ void PWM_Initial(
|
||||||
env->etpu_pwmconfig_tbl.bPwmUseTCR2 = (bool) false;
|
env->etpu_pwmconfig_tbl.bPwmUseTCR2 = (bool) false;
|
||||||
env->etpu_pwmconfig_tbl.u32ActiveTime = ActiveTime;
|
env->etpu_pwmconfig_tbl.u32ActiveTime = ActiveTime;
|
||||||
env->etpu_pwmconfig_tbl.u32PeriodTime = PeriodTime;
|
env->etpu_pwmconfig_tbl.u32PeriodTime = PeriodTime;
|
||||||
env->etpu_pwmconfig_tbl.bActiveHigh = (bool) true;
|
env->etpu_pwmconfig_tbl.bActiveHigh = (bool) false;
|
||||||
|
|
||||||
|
|
||||||
env->etpu_Int_config_tbl.bEventIntEn = (bool) true;
|
env->etpu_Int_config_tbl.bEventIntEn = (bool) true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue