-
Notifications
You must be signed in to change notification settings - Fork 573
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
apps/examples: add uart_loopback_test #6299
base: master
Are you sure you want to change the base?
Conversation
951dac4
to
f80bf67
Compare
read_total_size += ret_size; | ||
} | ||
printf("RECIVE SIZE: %d\n", read_total_size); | ||
printf("RECIVE UART: %s\n", read_buf); |
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.
RECEIVE SIZE and UART?
How about Received Message and Size
?
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.
I changed "RECEIVE(%d): %s\n"
#define TEST_STR "1234567890abcdefghijklmnopqrstuvwxyz" | ||
#define TEST_STR_LEN 37 | ||
|
||
static int uart_tx_loop(void) |
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.
Why is this named loop
?
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.
first time, i have made one time test, but i changed to repeat test
@ewoodev Any plan to update? |
d00088f
to
7e5bddd
Compare
ff6cec9
to
89969db
Compare
This is a test example where you can short-circuit the uart tx and rx boards to perform a loopback test. This test sends "1234567890abcdefghijklmnopqrstuvwxyz" and recive same string You can use CONIFG_UART_LOOPBACK_PORT to specify the port for the loopback test. [TEST RESULT] TASH>>uart_loopback start TASH>>######################### UART loopback test START ######################### UART RX THREAD START UART TX THREAD START SEND UART(1): 1234567890abcdefghijklmnopqrstuvwxyz RECEIVE(1): 1234567890abcdefghijklmnopqrstuvwxyz RESULT(1): PASSED SEND UART(2): 1234567890abcdefghijklmnopqrstuvwxyz RECEIVE(2): 1234567890abcdefghijklmnopqrstuvwxyz RESULT(2): PASSED SEND UART(3): 1234567890abcdefghijklmnopqrstuvwxyz RECEIVE(3): 1234567890abcdefghijklmnopqrstuvwxyz RESULT(3): PASSED
89969db
to
6cdb20a
Compare
This is a test example where you can short-circuit the uart tx and rx boards to perform a loopback test. This test sends "1234567890abcdefghijklmnopqrstuvwxyz" and recive same string
You can use CONIFG_UART_LOOPBACK_PORT to specify the port for the loopback test.
[TEST RESULT]
TASH>>uart_loopback
TASH>>######################### UART HW test START #########################
SEND SIZE: 37
SEND UART: 1234567890abcdefghijklmnopqrstuvwxyz
RECIVE SIZE: 37
RECIVE UART: 1234567890abcdefghijklmnopqrstuvwxyz
UART LOOPBACK TEST: PASSED
;######################### UART HW test END ###########################