How to add PWM control in SPC58EC-DISP using Ethernet gateway Hello!I have a SPC58EC-DISP and imported a sample application: Network Gateway Test; I added PWM control, but it keeps running PWM and cannot run the network gateway, what should I do? it used FreeRTOS.
/* eMIOS1 CH22 (PWM, GROUP2) period callback.*/
void emios1_gr2ch22_pcb(PWMDriver *pwmp) {
(void)pwmp;
}
/* eMIOS1 CH22 (PWM, GROUP2) period callback.*/
void emios1_gr2ch22_cb(PWMDriver *pwmp) {
(void)pwmp;
}
portTASK_FUNCTION(motorPwmTask, pvParam ) {
(void)pvParam;
pwm_lld_start(&PWMD14,&pwm_config_e1_gr2_pwmcfg);
for( ; ; ){
pwm_lld_enable_channel(&PWMD14, 5, PWM_PERCENTAGE_TO_WIDTH(&PWMD14, 5000), 100, 0, 0);
}
}
uint32_t motor_pwm_start(void) {
uint32_t ret;
/* create motor pwm task */
ret = xTaskCreate(motorPwmTask, "motorPwmTask", 1024, NULL, 6, NULL);
return (ret == pdPASS) ? 0 : 1;
}
/*
* Application entry point.
*/
int main(