Good day.
I have a problem with LPUART0 module. After initialization it start to recieve some data into FIFO even without conneced pins. LPUART1 works fine, settings for both modules are the same. Here's init code:
// Init. summary: 115200 baud, 1 stop bit, 8 bit format, no parity
void LPUART0_init(void)
{
PCC->PCCn[PCC_LPUART0_INDEX] &= ~PCC_PCCn_CGC_MASK; // Ensure clk disabled for config
PCC->PCCn[PCC_LPUART0_INDEX] |= PCC_PCCn_PCS(1) | PCC_PCCn_CGC_MASK;
LPUART0->BAUD = LPUART_BAUD_SBR(0x18) | LPUART_BAUD_OSR(16);
LPUART0->CTRL = LPUART_CTRL_RE(1) | LPUART_CTRL_TE(1) | LPUART_CTRL_RIE(1);
LPUART0->FIFO = LPUART_FIFO_TXFE(0) | LPUART_FIFO_RXFE(0) | LPUART_FIFO_RXFLUSH(1) | LPUART_FIFO_TXFLUSH(1);
}
registers:
LPUART0->STAT = 0x1E2C000
LPUART1->STAT = 0xC00000
LPUART0->FIFO = 0x800011
LPUART0->FIFO = 0xC00011
Maybe LPUART0 used for some other functions, that must be disabled before using this module?