ArduinoCore-samd icon indicating copy to clipboard operation
ArduinoCore-samd copied to clipboard

variant/mkrnb1500 SARA R410 UART not configured to utilize flow control (RTS/CTS)

Open ardiri opened this issue 3 years ago • 0 comments

the schematic of the MKRNB1500 includes support for flow control (RTS/CTS) between the samd21 and the ublox SARA r410 modem.

Screen Shot 2022-12-22 at 08 02 19

when looking at the implementation; the Serial UART fails to include the flow control lines, when the GSM 1400 does

variant/mkrnb1500/variant.cpp
// SerialSARA
Uart Serial2(&sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);

void SERCOM4_Handler()
{
  Serial2.IrqHandler();
}

variant/mkrgsm1400/variant.cpp
// SerialGSM
Uart Serial2(&sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX, PIN_SERIAL2_RTS, PIN_SERIAL2_CTS);

void SERCOM4_Handler()
{
  Serial2.IrqHandler();
}

to enable flow-control; the SerialSARA (Serial2) definition simply needs to be updated:

variant/mkrnb1500/variant.cpp
// SerialSARA
- Uart Serial2(&sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);
+ Uart Serial2(&sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX, PIN_SERIAL2_RTS, PIN_SERIAL2_CTS);

void SERCOM4_Handler()
{
  Serial2.IrqHandler();
}

ardiri avatar Dec 25 '22 01:12 ardiri