Hello,
I have checked the UART reference page but it hasn't been updated to include the Teensy 4, so l turned to looking at the code for HardwareSerial*.cpp (with thanks to Silvelock for the lead).
I see that Serial5 (UART8) is defined as “no CTS pin”:
Does this mean that I cannot use CTS at all on Serial5, or that I have to choose my own pin and pass it to attachCts()?
I have checked the UART reference page but it hasn't been updated to include the Teensy 4, so l turned to looking at the code for HardwareSerial*.cpp (with thanks to Silvelock for the lead).
I see that Serial5 (UART8) is defined as “no CTS pin”:
Code:
static HardwareSerial::hardware_t UART8_Hardware = {
4, IRQ_LPUART8, &IRQHandler_Serial5, &serial_event_check_serial5,
CCM_CCGR6, CCM_CCGR6_LPUART8(CCM_CCGR_ON),
#if defined(ARDUINO_TEENSY41)
{{21,2, &IOMUXC_LPUART8_RX_SELECT_INPUT, 1}, {46, 2, &IOMUXC_LPUART8_RX_SELECT_INPUT, 0}},
{{20,2, &IOMUXC_LPUART8_TX_SELECT_INPUT, 1}, {47, 2, &IOMUXC_LPUART8_TX_SELECT_INPUT, 0}},
#else
{{21,2, &IOMUXC_LPUART8_RX_SELECT_INPUT, 1}, {38, 2, &IOMUXC_LPUART8_RX_SELECT_INPUT, 0}},
{{20,2, &IOMUXC_LPUART8_TX_SELECT_INPUT, 1}, {39, 2, &IOMUXC_LPUART8_TX_SELECT_INPUT, 0}},
#endif
0xff, // No CTS pin
0, // No CTS
IRQ_PRIORITY, 38, 24, // IRQ, rts_low_watermark, rts_high_watermark
};
HardwareSerial Serial5(&IMXRT_LPUART8, &UART8_Hardware, tx_buffer5, SERIAL5_TX_BUFFER_SIZE,
rx_buffer5, SERIAL5_RX_BUFFER_SIZE);
Does this mean that I cannot use CTS at all on Serial5, or that I have to choose my own pin and pass it to attachCts()?