Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS
Hi.
I try start PWM on idkAM437x. I use CSL and RTOS. I create simple task and in task try start PWM.For this, I use next code:
status = CSL_epwmClockEnable(SOC_PWMSS0_REG);
if(status == CSL_PASS){
UART_printf("Clock Enable OK\n");
}
else{
if(status == CSL_EUNSUPPORTED_CMD){
UART_printf("Unsupported API on this SOC\n");
}
else{
UART_printf("Clock Enable false\n");
}
}
CSL_epwmHighResolutionDisable(SOC_PWMSS0_REG);
CSL_epwmTbPwmFreqCfg(SOC_PWMSS0_REG, 10000, 1000, CSL_EPWM_TB_COUNTER_DIR_UP, PWMSS_EPWM_TBCTL_PRDLD_LOAD_IMMEDIATELY);
CSL_epwmAqActionOnOutputCfg(SOC_PWMSS0_REG, CSL_EPWM_OUTPUT_CH_A, &my_CSL_EpwmAqActionCfg);
CSL_epwmTbTimebaseClkCfg(SOC_PWMSS0_REG, 10000, 10000000);
Clock enable is OK. It's wroted on terminal.
In step debug mode I see how registers of PWMSS_EPWM changed. After executing this code, I expect to see how the TBCNT register grows. But it remains equal to zero. Tell me, maybe there are more settings that need to be changed?
And yet, the register PWMSS0.SYSCONFIG.STANDBYMODE has a value of 0. I could not find a function that would change it to a value of 1. Could this be the reason?
Tell me how to properly initialize the PWM. In the С2000 series, I did not have such problems.