PWM on GPIO0 or GPIO2 lets Prog crash
Posted: Thu Feb 05, 2015 3:45 am
Hi,
I have defined PWM_CHANNEL = 4.
PWM 0,1,2 on GPIO12,13,14 works perfect.
But PWM3 on GPIO0 or GPIO2 lets program crash.
Define( added in pwm.h):
Usage:
added in pwm.c/pwm_init():
What is wrong????
I have defined PWM_CHANNEL = 4.
PWM 0,1,2 on GPIO12,13,14 works perfect.
But PWM3 on GPIO0 or GPIO2 lets program crash.
Define( added in pwm.h):
Code: Select all
#define PWM_3_OUT_IO_MUX PERIPHS_IO_MUX_GPIO2_U //weiss
#define PWM_3_OUT_IO_NUM 2
#define PWM_3_OUT_IO_FUNC FUNC_GPIO2
Usage:
Code: Select all
pwm_set_duty(atoi(buff), 3);
pwm_start();
added in pwm.c/pwm_init():
Code: Select all
PIN_FUNC_SELECT(PWM_3_OUT_IO_MUX, PWM_3_OUT_IO_FUNC);
What is wrong????