-
Notifications
You must be signed in to change notification settings - Fork 7.7k
-
Is there a way to use the full UART IDF functionality (UART-ISR) in Arduino.
As is possible e.g. in the Arduino Pico core, with full SDK functionality
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 4 comments 4 replies
-
What functionality are you missing? HardwareSerial uses the IDF, but hides a lot of the complexity. You can also get direct access to IDF functions by compiling "Arduino as IDF component", but that's difficult to build correctly.
Beta Was this translation helpful? Give feedback.
All reactions
-
P1: Rx- and Tx-Interrupt
P2: RTS and CTS
Beta Was this translation helpful? Give feedback.
All reactions
-
P1: Rx- and Tx-Interrupt
See Serial.onReceive()
#6134
P2: RTS and CTS
You are correct. I don't see that option in this repository.
Beta Was this translation helpful? Give feedback.
All reactions
-
thanks for info about Serial.onReceive()
Is there an option Serial.onEndTx()
I need an Int "EndOfTx" after each char who was transmitted.
Have you an idea what we can do to realise RTS/CTS
Beta Was this translation helpful? Give feedback.
All reactions
-
// negative Pin value will keep it unmodified
void HardwareSerial::setPins(int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin)
{
if(_uart == NULL) {
log_e("setPins() shall be called after begin() - nothing done");
return;
}
uartSetPins(_uart, rxPin, txPin, ctsPin, rtsPin);
}
I haven't used RTS/CTS.
Beta Was this translation helpful? Give feedback.
All reactions
-
HardwareSerial::setHwFlowCtrlMode()
Beta Was this translation helpful? Give feedback.
All reactions
-
I don't see an interrupt for TX. You could: 1) set TX buffer size to 1. 2) Use void HardwareSerial::flush(bool txOnly)
3) Use size_t HardwareSerial::write(uint8_t c)
to write one character at a time. Sounds inefficient.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the HardwareSerial::setHwFlowCtrlMode() infos.
Tx-IRQ is really needed!
Beta Was this translation helpful? Give feedback.