ESP8266 Developer Zone The Official ESP8266 Forum 2015-03-31T18:10:38+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=307 2015-03-31T18:10:38+08:00 2015-03-31T18:10:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=307&p=1189#p1189 <![CDATA[Re: Use pwm_init experiencing some problems]]>
uint16 h_time; 改为 uint32 h_time;

uint16 period; 改为 uint32 period;

修改后为:

struct pwm_single_param {
uint16 gpio_set;
uint16 gpio_clear;
uint32 h_time;
};

struct pwm_param {
uint32 period;
uint16 freq;
uint8 duty[PWM_CHANNEL];
};

Statistics: Posted by costaud — Tue Mar 31, 2015 6:10 pm


]]>
2015-03-26T16:35:52+08:00 2015-03-26T16:35:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=307&p=1162#p1162 <![CDATA[Use pwm_init experiencing some problems]]> GPIO0
pwm_init freq range 1 - 500
freq eq 500 it is OK,
freq eq 100 it is OK,
but freq eq 50 and 10 ,It is a problem.

attachment
code: freq = 10HZ
Oscilloscope picture: freq = 10HZ
code: freq = 50HZ
Oscilloscope picture: freq = 50HZ
code: freq = 100HZ
Oscilloscope picture: freq = 100HZ
调试截图.zip

Statistics: Posted by huafan — Thu Mar 26, 2015 4:35 pm


]]>