Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add an option to force IDF's default UART clock source#11191

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
me-no-dev merged 39 commits intoespressif:masterfromgonzabrusco:serial_clk_select
Apr 9, 2025

Conversation

gonzabrusco
Copy link
Contributor

@gonzabruscogonzabrusco commentedMar 27, 2025
edited by SuGlider
Loading

Description of Change

Using the ESP32 and baud rates lower than 250000, Arduino 3.X forces you to useREF_TICK as clock source for the UART (instead of the APB as Arduino 2.X). Only if the baud rate is higher than 250000, it switches toAPB. This restricts on the RX timeout you can configure with thesetRxTimeout method ofSerial. You can only set a maximum of 1 symbol timeout while usingREF_TICK. For using longer timeouts, you need to useAPB as clock source, but Arduino was not giving me the possibility. So I created this option that overrides this automatic selection.

This pull request introduces changes to the UART clock source configuration for the ESP32 platform, adding new options and improving flexibility. The key changes include adding a new configuration option in the Kconfig file, defining new clock source options, and updating the UART initialization and configuration methods to support these new options.

Configuration Updates:

  • Kconfig.projbuild: Added a new configuration optionARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE to force the default UART clock source from IDF, allowing users to override Arduino's automatic clock selection.
    ** This was the initial approach and motivation, but it was replaced by the newHardwareSerial::setClockSource() API.**

Code Enhancements:

  • cores/esp32/HardwareSerial.cpp: Implemented a new methodsetClockSource to set the UART clock source before starting UART usingbegin(). This method supports various clock sources based on the SoC.
  • cores/esp32/HardwareSerial.h: AddedSerialClkSrc enum to define different UART clock sources and updated theHardwareSerial class to include thesetClockSource method.[1][2]

Structural Changes:

  • cores/esp32/esp32-hal-uart.c: Modified theuart_struct_t structure to include_uart_clock_source and updated the UART initialization (uartBegin) and baud rate setting (uartSetBaudRate) methods to utilize the new clock source configuration.[1][2][3]
  • cores/esp32/esp32-hal-uart.h: Added theuartSetClockSource function to set the UART clock source mode, ensuring it is called beforeuartBegin().

Tests scenarios

  • With this option disabled, on an ESP32, try to set the timeout to 2 usingsetRxTimeout. You will see the following IDF error in the console:
    E (215) uart: tout_thresh = 2 > maximum value = 1
  • With this option enabled, you can set a higher rx timeout than 1.

Related links

#11132

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMar 27, 2025
edited
Loading

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message"Add an option to force IDF's default UART clock source":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • followConventional Commits style
  • correct format of commit message should be:<type/action>(<scope/component>): <summary>, for examplefix(esp32): Fixed startup timeout issue
  • allowed types are:change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses theConventional Precommit Linter).

👋Hello gonzabrusco, we appreciate your contribution to this project!


📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by thePR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with eachpush event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger isnot a substitute for human code reviews; it's still important to request a code review from your colleagues.
-Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manuallyretry these Danger checks, please navigate to theActions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫dangerJS against3e78c46

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMar 27, 2025
edited
Loading

Test Results

 76 files   76 suites   12m 47s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit3e78c46.

♻️ This comment has been updated with latest results.

@me-no-devme-no-dev added Peripheral: UARTRelated to the UART peripheral or its functionality. Status: Review neededIssue or PR is awaiting review labelsMar 27, 2025
@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMar 27, 2025
edited
Loading

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.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32P40⚠️ +1400.00⚠️ +0.04000.000.00
ESP32S30⚠️ +1760.00⚠️ +0.05000.000.00
ESP32S20⚠️ +960.00⚠️ +0.03000.000.00
ESP32C30⚠️ +1220.00⚠️ +0.04000.000.00
ESP32C60⚠️ +1400.00⚠️ +0.06000.000.00
ESP32H20⚠️ +1780.00⚠️ +0.06000.000.00
ESP320⚠️ +1200.00⚠️ +0.03000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
ArduinoOTA/examples/BasicOTA⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
AsyncUDP/examples/AsyncUDPClient⚠️ +1380⚠️ +1520⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +960
AsyncUDP/examples/AsyncUDPMulticastServer⚠️ +1380⚠️ +1520⚠️ +600⚠️ +1180⚠️ +1380--⚠️ +600
AsyncUDP/examples/AsyncUDPServer⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +920
DNSServer/examples/CaptivePortal⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
EEPROM/examples/eeprom_class⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1200⚠️ +1380⚠️ +1760⚠️ +880
EEPROM/examples/eeprom_extra⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
EEPROM/examples/eeprom_write⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/AnalogOut/LEDCFade⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/AnalogOut/LEDCSingleChannel00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/AnalogOut/LEDCSoftwareFade00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/AnalogOut/SigmaDelta00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/AnalogOut/ledcFrequency00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/AnalogOut/ledcWrite_RGB⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/AnalogRead⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/AnalogReadContinuous⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/ArduinoStackSize⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP32/examples/CI/CIBoardsTest⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +920
ESP32/examples/ChipID/GetChipID⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/DeepSleep/TimerWakeUp⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400--⚠️ +880
ESP32/examples/DeepSleep/TouchWakeUp⚠️ +1400⚠️ +1520⚠️ +720------⚠️ +880
ESP32/examples/FreeRTOS/BasicMultiThreading⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1200⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/FreeRTOS/Mutex⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP32/examples/FreeRTOS/Queue⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/FreeRTOS/Semaphore⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP32/examples/GPIO/BlinkRGB00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/GPIO/FunctionalInterrupt⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/GPIO/FunctionalInterruptStruct⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/GPIO/GPIOInterrupt⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/HWCDC_Events00⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760--
ESP32/examples/MacAddress/GetMacAddress⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/RMT/Legacy_RMT_Driver_Compatible⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/RMT/RMTCallback⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/RMT/RMTLoopback⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/RMT/RMTReadXJT⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/RMT/RMTWrite_RGB_LED⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/RMT/RMT_CPUFreq_Test⚠️ +1400⚠️ +1520⚠️ +720⚠️ +1200⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/RMT/RMT_EndOfTransmissionState⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/RMT/RMT_LED_Blink⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP32/examples/ResetReason/ResetReason⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/ResetReason/ResetReason2⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP32/examples/Serial/BaudRateDetect_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Serial/OnReceiveError_BREAK_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/Serial/OnReceive_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/Serial/RS485_Echo_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Serial/RxFIFOFull_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Serial/RxTimeout_Demo⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Serial/Serial_All_CPU_Freqs⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/Serial/Serial_STD_Func_OnReceive⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Serial/onReceiveExample⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/TWAI/TWAIreceive⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/TWAI/TWAItransmit⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
ESP32/examples/Template/ExampleTemplate00⚠️ +280⚠️ +280000000⚠️ +280
ESP32/examples/Time/SimpleTime⚠️ +1380⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
ESP32/examples/Timer/RepeatTimer⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1780⚠️ +880
ESP32/examples/Timer/WatchdogTimer⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/Touch/TouchInterrupt⚠️ +1380⚠️ +1520⚠️ +720------⚠️ +880
ESP32/examples/Touch/TouchRead⚠️ +1380⚠️ +1520⚠️ +720------⚠️ +880
ESP32/examples/Utilities/HEXBuilder⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/Utilities/MD5Builder⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP32/examples/Utilities/SHA1Builder⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
ESP_I2S/examples/ES8388_loopback⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
ESP_I2S/examples/Record_to_WAV⚠️ +1380⚠️ +1520--------⚠️ +880
ESP_I2S/examples/Simple_tone⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1200⚠️ +1380⚠️ +1760⚠️ +880
ESPmDNS/examples/mDNS-SD_Extended⚠️ +1380⚠️ +1640⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +880
ESPmDNS/examples/mDNS_Web_Server⚠️ +1380⚠️ +1120⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
Ethernet/examples/ETH_TLK110⚠️ +1380----------⚠️ +880
Ethernet/examples/ETH_W5500_Arduino_SPI⚠️ +1380⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
Ethernet/examples/ETH_W5500_IDF_SPI⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +920
Ethernet/examples/ETH_WIFI_BRIDGE⚠️ +1380⚠️ +1560⚠️ +840⚠️ +1180⚠️ +1380--⚠️ +880
FFat/examples/FFat_Test⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
FFat/examples/FFat_time⚠️ +1380⚠️ +1600⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +880
HTTPClient/examples/Authorization⚠️ +1380⚠️ +1400⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +1000
HTTPClient/examples/BasicHttpClient⚠️ +1380⚠️ +1400⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
HTTPClient/examples/BasicHttpsClient⚠️ +1380⚠️ +1520⚠️ +880⚠️ +1180⚠️ +1380--⚠️ +880
HTTPClient/examples/ReuseConnection⚠️ +1380⚠️ +1560⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +1160
HTTPClient/examples/StreamHttpClient⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +960
HTTPUpdate/examples/httpUpdate⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
HTTPUpdate/examples/httpUpdateSPIFFS⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
HTTPUpdate/examples/httpUpdateSecure⚠️ +1380⚠️ +1320⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
HTTPUpdateServer/examples/WebUpdater⚠️ +1380⚠️ +1520⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +920
LittleFS/examples/LITTLEFS_test⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
LittleFS/examples/LITTLEFS_time⚠️ +1380⚠️ +1520⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +840
NetBIOS/examples/ESP_NBNST⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
NetworkClientSecure/examples/WiFiClientInsecure⚠️ +1380⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
NetworkClientSecure/examples/WiFiClientPSK⚠️ +1380⚠️ +1600⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +840
NetworkClientSecure/examples/WiFiClientSecure⚠️ +1380⚠️ +1640⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +840
NetworkClientSecure/examples/WiFiClientSecureProtocolUpgrade⚠️ +1380⚠️ +1560⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
NetworkClientSecure/examples/WiFiClientShowPeerCredentials⚠️ +1380⚠️ +1400⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
NetworkClientSecure/examples/WiFiClientTrustOnFirstUse⚠️ +1380⚠️ +1640⚠️ +680⚠️ +1180⚠️ +1380--⚠️ +880
PPP/examples/PPP_Basic⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
PPP/examples/PPP_WIFI_BRIDGE⚠️ +1380⚠️ +1560⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
Preferences/examples/Prefs2Struct⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
Preferences/examples/StartCounter⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1400⚠️ +1760⚠️ +880
SD/examples/SD_Test⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
SD/examples/SD_time⚠️ +1380⚠️ +1560⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +880
SD_MMC/examples/SD2USBMSC⚠️ +1380⚠️ +1520----------
SD_MMC/examples/SDMMC_Test⚠️ +1380⚠️ +1520--------⚠️ +880
SD_MMC/examples/SDMMC_time⚠️ +1380⚠️ +1560--------⚠️ +920
SPI/examples/SPI_Multiple_Buses00⚠️ +280⚠️ +280000000⚠️ +280
SPIFFS/examples/SPIFFS_Test⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
SPIFFS/examples/SPIFFS_time⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
TFLiteMicro/examples/hello_world00⚠️ +280⚠️ +280000000⚠️ +280
Ticker/examples/Blinker00⚠️ +280⚠️ +280000000⚠️ +280
Ticker/examples/TickerBasic00⚠️ +280⚠️ +280000000⚠️ +280
Ticker/examples/TickerParameter00⚠️ +280⚠️ +280000000⚠️ +280
USB/examples/CompositeDevice⚠️ +1380⚠️ +1560⚠️ +720--------
USB/examples/ConsumerControl00⚠️ +280⚠️ +280--------
USB/examples/CustomHIDDevice⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/FirmwareMSC⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/Gamepad⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/HIDVendor⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/Keyboard/KeyboardLogout00⚠️ +280⚠️ +280--------
USB/examples/Keyboard/KeyboardMessage00⚠️ +280⚠️ +280--------
USB/examples/Keyboard/KeyboardReprogram00⚠️ +280⚠️ +280--------
USB/examples/Keyboard/KeyboardSerial⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/KeyboardAndMouseControl⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/MIDI/MidiController⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/MIDI/MidiInterface⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/MIDI/MidiMusicBox⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/MIDI/ReceiveMidi⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/Mouse/ButtonMouseControl00⚠️ +280⚠️ +280--------
USB/examples/SystemControl00⚠️ +280⚠️ +280--------
USB/examples/USBMSC⚠️ +1400⚠️ +1520⚠️ +720--------
USB/examples/USBSerial⚠️ +1380⚠️ +1520⚠️ +720--------
USB/examples/USBVendor⚠️ +1380⚠️ +1520⚠️ +720--------
Update/examples/AWS_S3_OTA_Update⚠️ +1380⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
Update/examples/HTTPS_OTA_Update⚠️ +1380⚠️ +1680⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +920
Update/examples/HTTP_Client_AES_OTA_Update⚠️ +1380⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
Update/examples/HTTP_Server_AES_OTA_Update⚠️ +1380⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
Update/examples/OTAWebUpdater⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
Update/examples/SD_Update⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
WebServer/examples/AdvancedWebServer⚠️ +1380⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/FSBrowser⚠️ +1380⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/Filters⚠️ +1380⚠️ +1520⚠️ +680⚠️ +1180⚠️ +1380--⚠️ +920
WebServer/examples/HelloServer⚠️ +1380⚠️ +1520⚠️ +600⚠️ +1180⚠️ +1380--⚠️ +560
WebServer/examples/HttpAdvancedAuth⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/HttpAuthCallback⚠️ +1380⚠️ +1600⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/HttpAuthCallbackInline⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/HttpBasicAuth⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/HttpBasicAuthSHA1⚠️ +1380⚠️ +1320⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/HttpBasicAuthSHA1orBearerToken⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/MultiHomedServers⚠️ +1380⚠️ +1560⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/PathArgServer⚠️ +1380⚠️ +1360⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/SDWebServer⚠️ +1380⚠️ +1480⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/SimpleAuthentification⚠️ +1380⚠️ +1520⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +920
WebServer/examples/UploadHugeFile⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WebServer/examples/WebServer⚠️ +1380⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +960
WebServer/examples/WebUpdate⚠️ +1380⚠️ +1600⚠️ +520⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/FTM/FTM_Initiator⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/FTM/FTM_Responder⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/SimpleWiFiServer⚠️ +1380⚠️ +1280⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiAccessPoint⚠️ +1380⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiClient⚠️ +1380⚠️ +1120⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +920
WiFi/examples/WiFiClientBasic⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +840
WiFi/examples/WiFiClientConnect⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiClientEvents⚠️ +1380⚠️ +1240⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiClientStaticIP⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +840
WiFi/examples/WiFiExtender⚠️ +1380⚠️ +1520⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiIPv6⚠️ +1380⚠️ +1440⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiMulti⚠️ +1380⚠️ +1560⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiMultiAdvanced⚠️ +1380⚠️ +1640⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiScan⚠️ +1380⚠️ +1520⚠️ +640⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiScanAsync⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiScanDualAntenna⚠️ +1380⚠️ +1560⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiScanTime⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiTelnetToSerial⚠️ +1380⚠️ +1360⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiUDPClient⚠️ +1380⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +1040
Wire/examples/WireMaster⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
Wire/examples/WireScan⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
Wire/examples/WireSlave⚠️ +1380⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/BLE5_extended_scan--⚠️ +1480--⚠️ +1180⚠️ +1380⚠️ +1760--
BLE/examples/BLE5_multi_advertising--⚠️ +1600--⚠️ +1180⚠️ +1380⚠️ +1760--
BLE/examples/BLE5_periodic_advertising--⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760--
BLE/examples/BLE5_periodic_sync--⚠️ +1560--⚠️ +1180⚠️ +1380⚠️ +1760--
BLE/examples/Beacon_Scanner--⚠️ +1560--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +920
BLE/examples/Client--⚠️ +1600--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/EddystoneTLM_Beacon--⚠️ +1560--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/EddystoneURL_Beacon--⚠️ +1560--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/Notify--⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/Scan--⚠️ +1600--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +920
BLE/examples/Server--⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/Server_multiconnect--⚠️ +1680--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +760
BLE/examples/UART--⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/Write--⚠️ +1560--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
BLE/examples/iBeacon--⚠️ +1520--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +960
ESP32/examples/Camera/CameraWebServer (1)--⚠️ +1480⚠️ +760------⚠️ +880
ESP32/examples/Camera/CameraWebServer (2)--⚠️ +1560⚠️ +680------⚠️ +1040
ESP32/examples/Camera/CameraWebServer (3)--⚠️ +1480----------
ESP32/examples/DeepSleep/ExternalWakeUp--⚠️ +1520⚠️ +720------⚠️ +880
ESP_NOW/examples/ESP_NOW_Broadcast_Master--⚠️ +1400⚠️ +960⚠️ +1180⚠️ +1380--⚠️ +880
ESP_NOW/examples/ESP_NOW_Broadcast_Slave--⚠️ +1280⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
ESP_NOW/examples/ESP_NOW_Network--⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
ESP_NOW/examples/ESP_NOW_Serial--⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +920
ESP_SR/examples/Basic--⚠️ +1520----------
HTTPClient/examples/HTTPClientEnterprise--⚠️ +1520⚠️ +520⚠️ +1180⚠️ +1380--⚠️ +880
Insights/examples/DiagnosticsSmokeTest--⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
Insights/examples/MinimalDiagnostics--⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/MatterColorLight--⚠️ +1640⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +1200
Matter/examples/MatterCommissionTest--⚠️ +1520⚠️ +840⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/MatterComposedLights--⚠️ +1600⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +920
Matter/examples/MatterContactSensor--⚠️ +1680⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/MatterDimmableLight--⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +520
Matter/examples/MatterEnhancedColorLight--⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +840
Matter/examples/MatterFan--⚠️ +1600⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +960
Matter/examples/MatterHumiditySensor--⚠️ +1600⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +840
Matter/examples/MatterMinimum--⚠️ +1760⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/MatterOccupancySensor--⚠️ +1560⚠️ +720⚠️ +1220⚠️ +1380--⚠️ +960
Matter/examples/MatterOnIdentify--⚠️ +1480⚠️ +600⚠️ +1180⚠️ +1380--⚠️ +920
Matter/examples/MatterOnOffLight--⚠️ +1440⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +640
Matter/examples/MatterOnOffPlugin--⚠️ +1480⚠️ +680⚠️ +1180⚠️ +1380--⚠️ +920
Matter/examples/MatterPressureSensor--⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
Matter/examples/MatterSmartButon--⚠️ +1600⚠️ +720⚠️ +1220⚠️ +1380--⚠️ +880
Matter/examples/MatterTemperatureLight--⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/MatterTemperatureSensor--⚠️ +1400⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
Matter/examples/MatterThermostat--⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
Matter/examples/WiFiProvWithinMatter--⚠️ +1680⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +960
NetworkClientSecure/examples/WiFiClientSecureEnterprise--⚠️ +1400⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
RainMaker/examples/RMakerCustom--⚠️ +1560⚠️ +680⚠️ +1180⚠️ +1380----
RainMaker/examples/RMakerCustomAirCooler--⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380----
RainMaker/examples/RMakerSonoffDualR3--⚠️ +1560⚠️ +480⚠️ +1180⚠️ +1380----
RainMaker/examples/RMakerSwitch--⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380----
SimpleBLE/examples/SimpleBleDevice--⚠️ +1400--⚠️ +1180⚠️ +1380⚠️ +1760⚠️ +880
WebServer/examples/Middleware--⚠️ +1520⚠️ +760⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WPS--⚠️ +1560⚠️ +800⚠️ +1180⚠️ +1380--⚠️ +760
WiFi/examples/WiFiBlueToothSwitch--⚠️ +1520--⚠️ +1180⚠️ +1380--⚠️ +920
WiFi/examples/WiFiClientEnterprise--⚠️ +1520⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +880
WiFi/examples/WiFiSmartConfig--⚠️ +1680⚠️ +680⚠️ +1180⚠️ +1380--⚠️ +880
WiFiProv/examples/WiFiProv--⚠️ +1440⚠️ +720⚠️ +1180⚠️ +1380--⚠️ +280
Zigbee/examples/Zigbee_Color_Dimmer_Switch--⚠️ +1600⚠️ +760⚠️ +1200⚠️ +1380⚠️ +1760⚠️ +920
Zigbee/examples/Zigbee_Gateway--⚠️ +1600⚠️ +720⚠️ +1180----⚠️ +880
Zigbee/examples/Zigbee_On_Off_Switch--⚠️ +1600⚠️ +760⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +880
Zigbee/examples/Zigbee_Range_Extender--⚠️ +1560⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +920
Zigbee/examples/Zigbee_Thermostat--⚠️ +1600⚠️ +720⚠️ +1180⚠️ +1380⚠️ +1780⚠️ +920
OpenThread/examples/COAP/coap_lamp--------⚠️ +1380⚠️ +1780--
OpenThread/examples/COAP/coap_switch--------⚠️ +1380⚠️ +1780--
OpenThread/examples/SimpleCLI--------⚠️ +1380⚠️ +1780--
OpenThread/examples/SimpleNode--------⚠️ +1380⚠️ +1760--
OpenThread/examples/SimpleThreadNetwork/ExtendedRouterNode--------⚠️ +1380⚠️ +1780--
OpenThread/examples/SimpleThreadNetwork/LeaderNode--------⚠️ +1380⚠️ +1760--
OpenThread/examples/SimpleThreadNetwork/RouterNode--------⚠️ +1380⚠️ +1760--
OpenThread/examples/ThreadScan--------⚠️ +1380⚠️ +1760--
OpenThread/examples/onReceive--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Analog_Input_Output--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_CarbonDioxide_Sensor--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_Color_Dimmable_Light--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_Contact_Switch--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Dimmable_Light--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Illuminance_Sensor--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_OTA_Client--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Occupancy_Sensor--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_On_Off_Light--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_PM25_Sensor--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Pressure_Flow_Sensor--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_Scan_Networks--------⚠️ +1380⚠️ +1760--
Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Temperature_Sensor--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Vibration_Sensor--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Wind_Speed_Sensor--------⚠️ +1380⚠️ +1780--
Zigbee/examples/Zigbee_Window_Covering--------⚠️ +1380⚠️ +1760--
BluetoothSerial/examples/DiscoverConnect------------⚠️ +640
BluetoothSerial/examples/GetLocalMAC------------⚠️ +880
BluetoothSerial/examples/SerialToSerialBT------------⚠️ +960
BluetoothSerial/examples/SerialToSerialBTM------------⚠️ +880
BluetoothSerial/examples/SerialToSerialBT_Legacy------------⚠️ +880
BluetoothSerial/examples/SerialToSerialBT_SSP------------⚠️ +880
BluetoothSerial/examples/bt_classic_device_discovery------------⚠️ +880
BluetoothSerial/examples/bt_remove_paired_devices------------⚠️ +880
ESP32/examples/DeepSleep/SmoothBlink_ULP_Code------------⚠️ +880
Ethernet/examples/ETH_LAN8720------------⚠️ +880

@SuGlider
Copy link
Collaborator

@gonzabrusco - Thank you for the PR and for the consistent collaboration! This PR is, certainly, a way for solving it.

After the discussion in#11132, I have been thinking about it. I was considering adding an extra parameter directly intoHardwareSerial::begin(...) (last parameter) that will allow the application to set any UART Clock Source based on the possible SoC options.

KConfig is not used by most Arduino Users.
It makes a lot of sense when building an application using Arduino as IDF Component.

May I add the extra parameter for defining the UART Clock Source on top of your PR?
Let me know. Otherwise I can open a new one.

@SuGliderSuGlider added the Status: Awaiting Responseawaiting a response from the author labelMar 28, 2025
@gonzabrusco
Copy link
ContributorAuthor

gonzabrusco commentedMar 28, 2025
edited
Loading

@gonzabrusco - Thank you for the PR and for the consistent collaboration! This PR is, certainly, a way for solving it.

After the discussion in#11132, I have been thinking about it. I was considering adding an extra parameter directly intoHardwareSerial::begin(...) (last parameter) that will allow the application to set any UART Clock Source based on the possible SoC options.

KConfig is not used by most Arduino Users. It makes a lot of sense when building an application using Arduino as IDF Component.

May I add the extra parameter for defining the UART Clock Source on top of your PR? Let me know. Otherwise I can open a new one.

@SuGlider Wow, I was just thinking exactly the same. I was about to propose that. Yes, the alternative to this is to have a last parameter in HardwareSerial::begin(...) that has a default value of -1 (Arduino current automatic clock selection). That way you don't break current sketches, and you also provide clock selection for each UART controller individually. I think that is a better approach to my original pull request.

If you want me to help you with that, just let me know. It's a pity this didn't make it into Arduino 3.2.0.

PS: Yes, you can add that on top of this PR. No problem.

SuGlider reacted with thumbs up emoji

@SuGliderSuGlider added Status: In Progress ⚠️Issue is in progress and removed Status: Review neededIssue or PR is awaiting review Status: Awaiting Responseawaiting a response from the author labelsMar 28, 2025
@SuGliderSuGlider moved this fromTodo toSelected for Development inArduino ESP32 Core Project RoadmapMar 31, 2025
@SuGliderSuGlider added this to the3.2.1 milestoneMar 31, 2025
@SuGlider
Copy link
Collaborator

@gonzabrusco - After discussing this change internally, we have decided not to add an extra parameter to the already full of parametersbegin(...).
Therefore, I'm adding a new method calledbool HardwareSerial::setClockSource(SerialClkSrc clkSrc) that must be called beforeHardwareSerial::begin() in order to apply choosen UART Clock Source.

In case that none is set, it will follow the current algorithm (REF_TICK for ESP32/S2 when baud rate < 250,000 - or APB otherwise || XTAL for all other SOC). It will also keep the option from kConfig as defined in your PR.

Let me know if you agree and/or have another suggestion.

@gonzabrusco
Copy link
ContributorAuthor

gonzabrusco commentedApr 2, 2025
edited
Loading

@gonzabrusco - After discussing this change internally, we have decided not to add an extra parameter to the already full of parametersbegin(...). Therefore, I'm adding a new method calledbool HardwareSerial::setClockSource(SerialClkSrc clkSrc) that must be called beforeHardwareSerial::begin() in order to apply choosen UART Clock Source.

In case that none is set, it will follow the current algorithm (REF_TICK for ESP32/S2 when baud rate < 250,000 - or APB otherwise || XTAL for all other SOC). It will also keep the option from kConfig as defined in your PR.

Let me know if you agree and/or have another suggestion.

That makes sense! LGTM

SuGlider reacted with thumbs up emoji

@SuGlider
Copy link
Collaborator

SuGlider commentedApr 4, 2025
edited
Loading

@SuGlider I was checking the code and everything seems fine except for my description of the KConfig option that, because of the changes, it didn't age well hehe.

Note: This configuration is not applicable to the low-power (LP) UART controller.

I think this note should be removed since you made that option apply to LP UART too!

I have changed the kconfig description. I think that I should changeHardwareSerial::setClockSource() to checkARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE and display a warning (log_w()) when it is enabled, becuase this function won't have any effect.

Another solution is to just allow it be there whenARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE is off, something similar to a#if 0 to remove it completly from the code, in caseARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE is on

Other option would be just leaveHardwareSerial::setClockSource() and remove theARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE kconfig option.

What do think that makes more sense?

gonzabrusco reacted with thumbs up emoji

@gonzabrusco
Copy link
ContributorAuthor

@SuGlider I was checking the code and everything seems fine except for my description of the KConfig option that, because of the changes, it didn't age well hehe.

Note: This configuration is not applicable to the low-power (LP) UART controller.

I think this note should be removed since you made that option apply to LP UART too!

I have changed the kconfig description. I think that I should changeHardwareSerial::setClockSource() to checkARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE and display a warning (log_w()) when it is enabled, becuase this function won't have any effect.

Another solution is to just allow it be there whenARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE is off, something similar to a#if 0 to remove it completly from the code, in caseARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE is on

Other option would be just leaveHardwareSerial::setClockSource() and remove theARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE kconfig option.

What do think that makes more sense?

To be completely honest, after all your hard work, I think the KConfig option has become virtually unnecessary. Although it was the initial trigger for this pull request, it has now evolved into something else, something better. So feel free to remove the KConfig option; it will also make the code more readable.

SuGlider reacted with thumbs up emoji

@SuGliderSuGlider added Status: In Progress ⚠️Issue is in progress and removed Status: Review neededIssue or PR is awaiting review labelsApr 4, 2025
@SuGlider
Copy link
Collaborator

@me-no-dev
Changed status to work on removing kconfig option and just leaving the newHardwareSerial::setClockSource() method.
It will get back to review in a couple days.

@SuGlider
Copy link
Collaborator

To be completely honest, after all your hard work, I think the KConfig option has become virtually unnecessary. Although it was the initial trigger for this pull request, it has now evolved into something else, something better. So feel free to remove the KConfig option; it will also make the code more readable.

Thanks! I agree to you. I have changed the code to remove kconfig setting.
Please go for a final review and then we will move forward for merging.

gonzabrusco reacted with thumbs up emoji

@SuGliderSuGlider requested a review fromCopilotApril 4, 2025 16:55
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

SuGlider reacted with eyes emoji
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (4)
  • cores/esp32/HardwareSerial.cpp: Language not supported
  • cores/esp32/HardwareSerial.h: Language not supported
  • cores/esp32/esp32-hal-uart.c: Language not supported
  • cores/esp32/esp32-hal-uart.h: Language not supported

SuGlider reacted with laugh emojigonzabrusco reacted with eyes emoji
@SuGliderSuGlider requested a review fromCopilotApril 4, 2025 22:07
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (4)
  • cores/esp32/HardwareSerial.cpp: Language not supported
  • cores/esp32/HardwareSerial.h: Language not supported
  • cores/esp32/esp32-hal-uart.c: Language not supported
  • cores/esp32/esp32-hal-uart.h: Language not supported

@SuGliderSuGlider added Status: Review neededIssue or PR is awaiting review and removed Status: In Progress ⚠️Issue is in progress labelsApr 4, 2025
@SuGlider
Copy link
Collaborator

@me-no-dev@P-R-O-C-H-Y@lucasssvaz - All set. Ready for review.

@me-no-devme-no-dev requested a review fromCopilotApril 5, 2025 15:41
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

@SuGliderSuGlider added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsApr 6, 2025
@me-no-devme-no-dev merged commit0cc8eab intoespressif:masterApr 9, 2025
57 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@me-no-devme-no-devme-no-dev approved these changes

@SuGliderSuGliderSuGlider approved these changes

Copilot code reviewCopilotCopilot left review comments

@lucasssvazlucasssvazAwaiting requested review from lucasssvaz

@P-R-O-C-H-YP-R-O-C-H-YAwaiting requested review from P-R-O-C-H-Y

Assignees

@SuGliderSuGlider

Labels
Peripheral: UARTRelated to the UART peripheral or its functionality.Status: Pending MergePull Request is ready to be merged
Projects
Milestone
3.2.1
Development

Successfully merging this pull request may close these issues.

3 participants
@gonzabrusco@SuGlider@me-no-dev

[8]ページ先頭

©2009-2025 Movatter.jp