Page 1 of 1
UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 12:04 pm
by GaneshPodPoint
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
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 1:28 pm
by ESP_Sprite
Hard to say... did a hard reboot solve it? Do you have any idea what caused the problem in the first place?
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 1:34 pm
by GaneshPodPoint
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
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 2:48 pm
by ESP_Sprite
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.
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 3:42 pm
by GaneshPodPoint
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.
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 4:01 pm
by GaneshPodPoint
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.
Re: UART1 TX pin not sending proper data
Posted: Mon Jun 08, 2020 8:18 pm
by GaneshPodPoint
Hi there, i read some that we need to add
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);
but when i look at the SDK there is no
DPORT_UART_MEM_RST
Do we need to add
"DPORT_UART_MEM_RST"
It is in link
https://github.com/espressif/esp-idf/issues/1202
Re: UART1 TX pin not sending proper data
Posted: Tue Jun 16, 2020 7:53 am
by GaneshPodPoint
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
Re: UART1 TX pin not sending proper data
Posted: Wed Jun 17, 2020 5:31 pm
by GaneshPodPoint
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
Code: Select all
"021a00444e010100130022030002000032e803000302000032d0070003bced"
but it sends out
Code: Select all
"0302000032d0070003bced021a00444e010100130022030002000032e80300"
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