Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

How to set TXD/RXD/RTS/CTS for UART #7

Open
Herwey opened this issue Mar 29, 2019 · 5 comments
Open

How to set TXD/RXD/RTS/CTS for UART #7

Herwey opened this issue Mar 29, 2019 · 5 comments

Comments

@Herwey
Copy link

Herwey commented Mar 29, 2019

Hi
Now I am using M5 model A for UART, how to set TXD/RXD/RTS/CTS ?? I set it as below:
#define ECHO_TEST_TXD (28)
#define ECHO_TEST_RXD (14)
#define ECHO_TEST_RTS (12)
#define ECHO_TEST_CTS (13)

But it not worked very well

@EeeeBin
Copy link
Contributor

EeeeBin commented Mar 29, 2019

@Herwey
Copy link
Author

Herwey commented Mar 29, 2019

Thanks ! I used this , but nothing printed in serial....

@EeeeBin
Copy link
Contributor

EeeeBin commented Mar 29, 2019

https://github.com/m5stack/m5stack-cam-psram/blob/uart/main/main.c#L132
Serial print in tx=13, rx=12, not in usb-c bus

@Herwey
Copy link
Author

Herwey commented Mar 29, 2019

I see, I used "make monitor". When I open a serial tool, I set the "baud_rate = 921600", it was wrong, it's not as below
uart_write_bytes(UART_NUM_1, (char *)tx_buffer, 7);
uart_write_bytes(UART_NUM_1, (char *)fb->buf, fb->len);
When I set "baud_rate = 115200", I can see the print info, but not serial.Right?

@Herwey
Copy link
Author

Herwey commented Mar 30, 2019

I set the pin as below:
uart_set_pin(UART_NUM_0, 13, 12, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
It can send the data from serial, but it can't read the data from serial.
emmm...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants