-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(LP_UART): Implements the ESP32-C6/ESP32-P4 Low Power UART as a possible HardwareSerial port #10967
base: release/v3.2.x
Are you sure you want to change the base?
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 62 files 62 suites 6m 26s ⏱️ Results for commit 7cca982. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
cores/esp32/HardwareSerial.cpp
Outdated
@@ -477,6 +510,12 @@ void HardwareSerial::setDebugOutput(bool en) { | |||
if (_uart == 0) { | |||
return; | |||
} | |||
#if (SOC_UART_LP_NUM >= 1) | |||
if (_uart_nr == LP_UART_NUM_0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (_uart_nr >= SOC_UART_HP_NUM) {
Will handle cases where LP uarts are more than one (future)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be done like that for future extension, although there no single applicable case.
I'll review it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Done.
There are many checks if the uart is LP0. Can the code be made to work with "any" number LP uarts? |
Solved. It supports any number of LP UART ports |
Description of Change
Adds support for ESP32-C6 and ESP32-P4 to use the LP UART peripheral as a possible
HardwareSerial
port.ESP32-C6 has now a total of 3
HardwareSerial
devices: 2 HP UART ports,Serial0
andSerial1
plus a LP UART portSerial2
ESP32-P4 has now a total of 6
HardwareSerial
devices: 5 HP UART ports,Serial0
toSerial4
plus a LP UART portSerial5
ESP32-P4 can set any pin for being used as
Serial5
RX/TX/CTS/RTX pins.ESP32-C6 must use fixed pins for
Serial2
: RX(4), TX(5), RTS(2), CTS(3)Limitations:
LP UART port can't be used for logging using
log_x()
LP UART is not elegible for setting loopbacks to other UART peripheral (no GPIO Matrix Signal)
Tests scenarios
Using ESP32-C6 and ESP32P4
Related links
None