while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

kvjavali
Posts: 4
Joined: Wed Aug 30, 2017 12:24 pm

while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby kvjavali » Fri Sep 01, 2017 7:07 am

Hi i am working on ESP32
while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times, the same functionality is working fine with uart-2 , can anyone suggest solution to fix this issue.
here i am attaching the code what i am using please find the attachment below.

Thanks & Regards
kv javali
Attachments
WIFI.c
(2.8 KiB) Downloaded 952 times
UART_RESET.png
UART_RESET.png (236.22 KiB) Viewed 9051 times
main.c
(1.69 KiB) Downloaded 951 times

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby ESP_Sprite » Fri Sep 01, 2017 7:40 am

Pin 9 and 10 are used for the SPI flash as well; putting an UART there interferes with reading code from that flash, making everything crash. Use different GPIOs and you should be fine.

kvjavali
Posts: 4
Joined: Wed Aug 30, 2017 12:24 pm

Re: while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby kvjavali » Fri Sep 01, 2017 9:21 am

Thanks for the replay "ESP_Sprite"

I couldn't find any alternative pins for uart1, in datasheet they given only pin 9&10.

I am getting this issue only when WiFi init is called, without that i am not getting this resetting problem.
Could you please check that also,

Now we are in a situation that we cant change the pins of uart1, Is there any alternative without changing the pins to solve this issue.

Thanks

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby ESP_Sprite » Sat Sep 02, 2017 2:52 am

Erm, what do you think the uart_set_pin function is for? You can essentially set the UART pins to any ESP32 pins that way (given they match the characteristics you need, that is, you can't set TxD to a non-output GPIO).

As you have it now, you're essentially pulling up and down the write protect and hold lines of your flash during UART transmissions. As far as I know, there's no simple workaround for that crashing the system eventually.

User avatar
hassan789
Posts: 156
Joined: Thu Jun 29, 2017 2:15 am

Re: while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby hassan789 » Sat Sep 02, 2017 9:54 pm

Hi, one solution would be to execute from ram, instead of flash. And do not use the flash at all...
Sorry to hear about this.

Is this on the D2WD chip?

kvjavali
Posts: 4
Joined: Wed Aug 30, 2017 12:24 pm

Re: while using uart-1 receive interrhe rupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 t

Postby kvjavali » Thu Sep 07, 2017 5:42 am

#hassan789

thanks for the reply
how to use only ram instead of flash , can you please tell briefly or any docs related to that, please share it


Thanks & Regards
KV javali

User avatar
hassan789
Posts: 156
Joined: Thu Jun 29, 2017 2:15 am

Re: while using uart-1 receive interrupt and WiFi together in ESP32 , module is resetting after receiving data 3-4 times

Postby hassan789 » Wed Sep 13, 2017 4:31 am

I am not an expert in that. Please open a new thread, asking about how to link and execute everything from ram.

Who is online

Users browsing this forum: No registered users and 97 guests