Hello people. I love esp8266, this great congratulations. But I need help with hw_timer.
The "OLED__Print" routine takes a long time and "hw_timer" does not interrupt it as described in the manual, so my PWM dimmer in "Set_Dim_handler" failed to second by second. There is some way to solve this. Thank you.
hw_timer_set_func(Set_Dim_handler);
hw_timer_init(NMI_SOURCE, 1);
hw_timer_arm(2000);
os_timer_disarm(&ntp_timer);
os_timer_setfn(&ntp_timer,ntp_time_update,NULL);
os_timer_arm(&ntp_timer,1000,1);
;********************************************************
void Set_Dim_handler(void) {
Put_OUTPUT(Canal_1_Pin,1);
os_delay_us(15);
Put_OUTPUT(Canal_1_Pin,0);
Corrent_T = Pwm_Luz[1].T1;
RTC_REG_WRITE(FRC1_LOAD_ADDRESS, Corrent_T);
}
void ICACHE_FLASH_ATTR ntp_time_update(void *ignored){
sntp_time++;
os_sprintf(TFT_Data , "%02d:%02d.%02d",_hour,_min,_sec);
OLED__Print(13, 0, TFT_Data,1);
}
esp8266 hw_timer
-
- Posts: 1
- Joined: Tue Sep 29, 2020 4:26 pm
Who is online
Users browsing this forum: No registered users and 3 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.