
Originally Posted by
Mike Maurice
I don't understand the connection between the Serial8.begin and the LPUART5.
LPUART6 or 8 if used in place of the 5 strings does not work, but 5 does.
I can find no documentation in the IMXRT1062 that shows the connection or how the LPUARTx relates to the Serial ports on the teensy 4.x processors.
Do you know or did you get this working just by testing?
Thanks in advance.
Serial8 is an Arduino concept where all of the SerialX are of the class HardwareSerial.
But underlying each one is a Hardware device lpusart: See chapter 49 IMXRT manual.
In this case Serial8 is built using LpUart5...
You can find out this information a few different ways: You can look at what IO pins you are talking to and then map those through the IMXRT reference...
Which I have in my spreadsheets like:

Which you can see Alt1 for those pins are LPUART5 RX and TX pins...
Or you can look at sources as the serial objects are table driven: SO looking at HardwareSerial8.cpp you will see:
Code:
static HardwareSerial::hardware_t UART5_Hardware = {
7, IRQ_LPUART5, &IRQHandler_Serial8,
&serialEvent8, &_serialEvent8_default,
CCM_CCGR3, CCM_CCGR3_LPUART5(CCM_CCGR_ON),
{{34,1, &IOMUXC_LPUART5_RX_SELECT_INPUT, 1}, {48, 2, &IOMUXC_LPUART5_RX_SELECT_INPUT, 0}},
{{35,1, &IOMUXC_LPUART5_TX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
50, // CTS pin
2, // CTS
IRQ_PRIORITY, 38, 24, // IRQ, rts_low_watermark, rts_high_watermark
XBARA1_OUT_LPUART5_TRG_INPUT
};
HardwareSerial Serial8(&IMXRT_LPUART5, &UART5_Hardware, tx_buffer8, SERIAL8_TX_BUFFER_SIZE,
rx_buffer8, SERIAL8_RX_BUFFER_SIZE);
#endif
Several hints in that table including the one in RED