Custom Board WIFI ISSUE

Nasib Fahim
Posts: 11
Joined: Wed Jun 23, 2021 2:22 pm

Custom Board WIFI ISSUE

Postby Nasib Fahim » Wed Jun 23, 2021 2:27 pm

Hello all. I have developed a custom board based on esp32s2-wroom device. I have tested it with alot of code (UART, Timmers, GPIO, Interrupts...) and everything works great. BUT: :?: :?: :?:

When i try to upload a wifi code (even the simpliest scan code) it allways says this:

I (479) wifi:wifi driver task: 3ffd891c, prio:23, stack:6656, core=0
I (479) system_api: Base MAC address is not set
I (479) system_api: read default base MAC address from EFUSE
I (489) wifi:wifi firmware version: c44a5e7
I (489) wifi:wifi certification version: v7.0
I (489) wifi:config NVS flash: enabled
I (499) wifi:config nano formating: disabled
I (499) wifi:Init data frame dynamic rx buffer num: 32
I (509) wifi:Init management frame dynamic rx buffer num: 32
I (509) wifi:Init management short buffer num: 32
I (519) wifi:Init dynamic tx buffer num: 32
I (519) wifi:Init static rx buffer size: 1600
I (519) wifi:Init static rx buffer num: 10
I (529) wifi:Init dynamic rx buffer num: 32
I (529) wifi_init: rx ba win: 6
I (539) wifi_init: tcpip mbox: 32
I (539) wifi_init: udp mbox: 6
I (539) wifi_init: tcp mbox: 6
I (549) wifi_init: tcp tx win: 5744
I (549) wifi_init: tcp rx win: 5744
I (559) wifi_init: tcp mss: 1440
Exception in thread Thread-2:
Traceback (most recent call last):
File "threading.py", line 932, in _bootstrap_inner
File "threading.py", line 870, in run
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 166, in _run_
outer
self.run()
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 378, in run
data = self.serial.read(self.serial.in_waiting or 1)
File "C:\Users\Nasib\.espressif\python_env\idf4.2_py3.8_env\lib\site-packages\
serial\serialwin32.py", line 259, in in_waiting
raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError(
)))
serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'A
cceso denegado.', None, 5))




Is like the device doesnt want to enable the wifi.... what do you think that could be happenning??

I am super lost now...

Thank you so much in advance for your help

Best regards...

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

Re: Custom Board WIFI ISSUE

Postby ESP_Sprite » Thu Jun 24, 2021 1:33 am

Sounds like you have a brownout and your USB-serial bridge chip (or the ESP32S2 itself, if you're using internal USB) is falling off the USB bus. Make sure your power supply can deliver >=500mA on the 3.3V rails, and that the supply lines are sufficiently decoupled. If you have pics or schematics of your hardware, we can take a look at it.

Stephan
Posts: 12
Joined: Tue Aug 27, 2019 2:42 am

Re: Custom Board WIFI ISSUE

Postby Stephan » Thu Jun 24, 2021 5:05 am

We make custom boards as well, for mass production. I fully agree on ESP_Sprite's contribution above to be the most likely cause. In addition, make sure you have a proper reset cycle at the beginning. We once had spurious side effects, similar to what you describe, when we did not do a proper reset. The board seemed to have booted fine, but crashed (much) later.

Nasib Fahim
Posts: 11
Joined: Wed Jun 23, 2021 2:22 pm

Re: Custom Board WIFI ISSUE

Postby Nasib Fahim » Fri Jun 25, 2021 1:32 pm

Thanks all..

What I don't understand is that any other code is perfectly working in my custom board but the WiFi... If other codes are charged correctly I suppose that it is not a hardware problem right? .. not decoupling nor even reset or insufficient current from the usb right ?

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

Re: Custom Board WIFI ISSUE

Postby ESP_Sprite » Sun Jun 27, 2021 3:27 am

The WiFi subsystem is very spikey in its power requirements; when enabled it can require high currents for a short while. It can overload a power supply that is otherwise perfectly capable of running the rest of the SoC.

Stephan
Posts: 12
Joined: Tue Aug 27, 2019 2:42 am

Re: Custom Board WIFI ISSUE

Postby Stephan » Sun Jun 27, 2021 8:36 am

CPU_ESP32_4.pdf
(19.93 KiB) Downloaded 568 times
See here is our schematic, based on voltage regulator LM3691 and two selector diodes, to choose between USB power or Lithium-Polymer battery. This works fine. If you want, post your schematic for a look and comment.

Who is online

Users browsing this forum: No registered users and 87 guests