Skip to content

Commit

Permalink
More UART glitch improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dnc40085 committed Feb 3, 2017
1 parent aad1e12 commit 40b571a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/pm/pmSleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ static void null_mode_check_timer_cb(void* arg){
(READ_PERI_REG(UART_STATUS(1)) & (UART_TXFIFO_CNT<<UART_TXFIFO_CNT_S)) == 0){
ets_timer_disarm(&null_mode_check_timer);
suspend_all_timers();
//Ensure UART 0/1 TX FIFO is clear
SET_PERI_REG_MASK(UART_CONF0(0), UART_TXFIFO_RST);//RESET FIFO
CLEAR_PERI_REG_MASK(UART_CONF0(0), UART_TXFIFO_RST);
SET_PERI_REG_MASK(UART_CONF0(1), UART_TXFIFO_RST);//RESET FIFO
CLEAR_PERI_REG_MASK(UART_CONF0(1), UART_TXFIFO_RST);
wifi_fpm_do_sleep(current_config.sleep_duration);
return;
}
Expand Down

0 comments on commit 40b571a

Please sign in to comment.