UART1 TX pin not sending proper data
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
UART1 TX pin not sending proper data
We have a unit in our client side and we have unusual behaviour in UART1. After debugging remotely, i found that TX pin is not sending the data properly. The pin for UART1 that i am using is
#define UART1_RX_PIN GPIO_NUM_22
#define UART1_TX_PIN GPIO_NUM_23
I did a soft reboot in ESP32 but did not recover.
Iam using ESP IDF v 3.1
Could any one tell us that what could be the reason that it did not recover after soft reboot?
Thanks
Ganesh
#define UART1_RX_PIN GPIO_NUM_22
#define UART1_TX_PIN GPIO_NUM_23
I did a soft reboot in ESP32 but did not recover.
Iam using ESP IDF v 3.1
Could any one tell us that what could be the reason that it did not recover after soft reboot?
Thanks
Ganesh
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: UART1 TX pin not sending proper data
Hard to say... did a hard reboot solve it? Do you have any idea what caused the problem in the first place?
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
We have two RFID reader attached to UART1 and UART2. We have signal interference in the board. After hard reboot i see the proper communication but still we have RFID signal interference.
Is RFID signal can create the problem in UART communication? Do we need any resistor or any capacitor to add between RX and TX?
Thanks
Ganesh
Is RFID signal can create the problem in UART communication? Do we need any resistor or any capacitor to add between RX and TX?
Thanks
Ganesh
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: UART1 TX pin not sending proper data
Hmm, sounds like some weird latchup issue then...
Wrt RFID interference: Hard to say, it depends on a lot of things: the layout of your board, power supply decoupling, wiring, ... It probably helps a bit if you can attach a scope to the Rx/Tx lines and see if there's any interference there.
Wrt RFID interference: Hard to say, it depends on a lot of things: the layout of your board, power supply decoupling, wiring, ... It probably helps a bit if you can attach a scope to the Rx/Tx lines and see if there's any interference there.
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
Thanks for your response, We cannot take the scope from RX/TX as the product is in customer side. We will provide you if we have chance to capture the RX/TX line in scope.
Thanks for your help.
Thanks for your help.
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
By the way, Did we have any issue reported by other people regarding UART RX/TX?
Some of them are reporting in https://github.com/espressif/esp-idf/issues/2614
Could that be related.
Some of them are reporting in https://github.com/espressif/esp-idf/issues/2614
Could that be related.
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
Hi there, i read some that we need to add
but when i look at the SDK there is no
It is in link
https://github.com/espressif/esp-idf/issues/1202
Code: Select all
//esp_restart_noos
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_TIMERS_RST | DPORT_SPI01_RST | DPORT_UART_RST | DPORT_UART1_RST | DPORT_UART2_RST | DPORT_UART_MEM_RST);
Do we need to add "DPORT_UART_MEM_RST"DPORT_UART_MEM_RST
It is in link
https://github.com/espressif/esp-idf/issues/1202
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
We found the same issue in another board as well. At the moment we do not have log print but from the oscilloscope we can see that the yellow line is TX from ESP32 and it is sending some garbage data.
I have seen in the code that there is reset for RX fifo but i don't see any reset for TX fifo in ESP IDF v3.1.
Could you please how to reset the TX fifo. I believe it is something not right in TX.
Thanks
Ganesh
I have seen in the code that there is reset for RX fifo but i don't see any reset for TX fifo in ESP IDF v3.1.
Could you please how to reset the TX fifo. I believe it is something not right in TX.
Thanks
Ganesh
- Attachments
-
- Screenshot_2020-06-15-17-59-24.png (62.34 KiB) Viewed 7885 times
-
- Posts: 12
- Joined: Thu Oct 24, 2019 12:37 pm
Re: UART1 TX pin not sending proper data
Hi there,
Can someone help me why the TX data is sending the wrong frame data.
After more debugging i found very wired data coming out from the esp32 Tx.
Correct data should be
but it sends out
It is just looping around the data.
I need to reset the TX fifo. Can anyone help me how to reset the TX fifo in esp idf 3.1
Thanks
Ganesh
Can someone help me why the TX data is sending the wrong frame data.
After more debugging i found very wired data coming out from the esp32 Tx.
Correct data should be
Code: Select all
"021a00444e010100130022030002000032e803000302000032d0070003bced"
but it sends out
Code: Select all
"0302000032d0070003bced021a00444e010100130022030002000032e80300"
I need to reset the TX fifo. Can anyone help me how to reset the TX fifo in esp idf 3.1
Thanks
Ganesh
- Attachments
-
- image (3).png (350.82 KiB) Viewed 7800 times
Who is online
Users browsing this forum: Bing [Bot] and 249 guests