Merge pull request #1824 from bthebaudeau/cc2538-fix-garbled-uart

cc2538: uart: Fix garbled output occurring upon lpm_enter()
This commit is contained in:
George Oikonomou 2016-08-16 08:47:09 +01:00 committed by GitHub
commit acbc482e55

View file

@ -230,9 +230,7 @@ permit_pm1(void)
const uart_regs_t *regs;
for(regs = &uart_regs[0]; regs < &uart_regs[UART_INSTANCE_COUNT]; regs++) {
/* Note: UART_FR.TXFE reads 0 if the UART clock is gated. */
if((REG(SYS_CTRL_RCGCUART) & regs->sys_ctrl_rcgcuart_uart) != 0 &&
(REG(regs->base + UART_FR) & UART_FR_TXFE) == 0) {
if((REG(regs->base + UART_FR) & UART_FR_BUSY) != 0) {
return false;
}
}