You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/20 13:11:41 UTC
[GitHub] [incubator-nuttx] patacongo opened a new issue #1092: LPC17_40: UART set the buadrate jump to the Infinite loop
patacongo opened a new issue #1092:
URL: https://github.com/apache/incubator-nuttx/issues/1092
This was Issue 173 in the old Bitbucket repository
Former user
created an issue 2019-10-09
In arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c, function ioctrl:
lcr = getreg32(priv->uartbase + LPC17_40_UART_LCR_OFFSET);
up_serialout(priv, LPC17_40_UART_LCR_OFFSET, (lcr | UART_LCR_DLAB));
/* Set the BAUD divisor */
#ifdef LPC176x
dl = lpc17_40_uartdl(priv->baud, priv->cclkdiv);
#else
dl = lpc17_40_uartdl(priv->baud);
#endif
up_serialout(priv, LPC17_40_UART_DLM_OFFSET, dl >> 8);
up_serialout(priv, LPC17_40_UART_DLL_OFFSET, dl & 0xff);
/* Clear DLAB */
up_serialout(priv, LPC17_40_UART_LCR_OFFSET, lcr);
the DLAB can only write during the uart reg 0x7C USR bit 0 is clear。 when the uart is busy the setting will cause the IIR[3:0] = 0111
UART_16550_COMPATIBLE = NO and master has tried to write to the Line Control Register while the DW_apb_uart is busy (USR[0] is set to 1).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org