-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix(uart): uses IDF 5.x API to set loopback #10442
Conversation
Uses void uart_internal_loopback(uint8_t uartNum, bool loop_back_en) IDF 5.x API.
👋 Hello SuGlider, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Uses void uart_internal_loopback(uint8_t uartNum, bool loop_back_en) IDF 5.x API.
Test Results 62 files 62 suites 16m 29s ⏱️ For more details on these failures, see this check. Results for commit b342545. ♻️ This comment has been updated with latest results. |
Update OnReceiveError_BREAK_Demo.ino to use new API.
Update OnReceive_Demo.ino to se new API.
Update RxFIFOFull_Demo.ino to use new testing API.
Update RxTimeout_Demo.ino to use new testing API.
Update Serial_STD_Func_OnReceive.ino to use new testing API
Update periman.ino to use new UART loopback test API
Update uart.ino to use newuart loopback API
Update uart.ino - missing change in code
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]
|
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.
Still not working on P4 as expected:
ESP-ROM:esp32p4-20230811
Build:Aug 11 2023
rst:0x1 (POWERON),boot:0x31f (SPI_FAST_FLASH_BOOT)
SPI mode:DIO, clock div:1
load:0x4ff33ce0,len:0x1130
load:0x4ff2abd0,len:0xc20
load:0x4ff2cbd0,len:0x314c
entry 0x4ff2abd0
Begin when running test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:563:begin_when_running_test:PASS
Basic transmission test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:564:basic_transmission_test:PASS
Buffer resize test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:565:resize_buffers_test:PASS
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:128:change_baudrate_test:FAIL: Expected 'Hello from Serial1 (UART1) >>> via loopback >>> Serial1 (UART1) using 115200 baudrate' Was 'Hello from Serial4 (UART4) >>> via loopback >>> Serial4 (UART4) using 9600 baudrate'
Change CPU frequency test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:567:change_cpu_frequency_test:PASS
Disabled UART calls test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:568:disabled_uart_calls_test:PASS
Enabled UART calls test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:569:enabled_uart_calls_test:PASS
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:496:periman_test:FAIL: Expected '' Was 'Hello from Serial1 (UART1) >>> via loopback >>> Serial1 (UART1) while used by I2C'
Change pins test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:576:change_pins_test:PASS
End when stopped test successful
/Users/lucassvaz/Espressif/Arduino/sketches/test/test.ino:577:end_when_stopped_test:PASS
-----------------------
10 Tests 2 Failures 0 Ignored
FAIL
Closing as I could now handle the ESP32-P4 and just found out that there isn't any issue with the current implementation of |
Description of Change
Uses void uart_internal_loopback(uint8_t uartNum, bool loop_back_en) IDF 5.x API.
Necessary to make it work with ESP32-P4.
In order to make ESP32-P4 UART loopback to work, the UART peripheral bit enables internal UART loop back.
It shall be turned off when the Serial port ends or when the RX or TX pins are detached.
This PR also deals with ESP32-P4 that has 5 UART ports.
There is definition for UART0 and UART1 pins.
Other UART shall have its pins setup in
begin()
.This PR checks if the pins have been set and issues an error message in case no pins RX/TX are defined.
Tests scenarios
CI and PyTest Scripts
ESP32-P4:
Related links
None