ESP32C3内部WiFi与蓝牙进程如何彻底关闭?

Moderator: ESP_ZT

deng_ESP32
Posts: 1
Joined: Fri Aug 11, 2023 3:29 am

ESP32C3内部WiFi与蓝牙进程如何彻底关闭?

Postby deng_ESP32 » Fri Aug 11, 2023 3:45 am

我是目前在Arduino环境下使用ESP32C3,并且试图完全将其作为一颗普通的MCU使用而无需其蓝牙与WiFi功能。
但是遇到一个问题,似乎ESP32C3内部是默认定期启动其射频单元的,从测试时间来看大概每隔4s启动一次,并持续工作2s,一个典型的验证方案是我在loop函数中设置了一个在端口20设置了一个每隔10ms发送一次方波,未开启其它任何功能,结果绝大多数方波间隔都是1ms,但是每隔2s会出现一次方波间隔为14ms,说明该间隔期间内芯片启动了其它进程导致多用了4ms。该进程的发生会导致2s内工作电流的上升,和ADC出现一定的不稳定,因此我希望将其彻底关闭,猜测该进程WiFi或者蓝牙的激活扫描,但是我是用 WiFi.disconnect(true)和WiFi.mode(WIFI_OFF)指令后,该周期性进程依然存在,并且会影响到我的其它功能。
请问有什么办法可以再Arduino中彻底关闭蓝牙与WiFi呢,防止其定期启动影响其它功能呢?
跪求各位大佬的帮忙!

ESP-Ali
Posts: 1
Joined: Thu Jun 15, 2023 4:01 am

Re: ESP32C3内部WiFi与蓝牙进程如何彻底关闭?

Postby ESP-Ali » Wed Aug 16, 2023 2:01 am

Hello, Thank you for reaching out with your question. Based on the details you've provided, I'm having difficulty reproducing your issue. Could you please share your Arduino sketch sample? In the meantime, I've gathered that you're attempting to avoid using WiFi and BLE functionality on the ESP32-C3.

One potential explanation for this situation could be your usage of the delay function in your Arduino sketch, which might not provide precise timing. To achieve more accurate delays, consider utilizing the millis function. To assist you further, Please refer to this example for turning on and off Wifi and BLE. [url][https://github.com/espressif/arduino-es ... Switch.ino]

ESP_Bob
Posts: 80
Joined: Fri Nov 27, 2020 12:52 pm

Re: ESP32C3内部WiFi与蓝牙进程如何彻底关闭?

Postby ESP_Bob » Wed Aug 16, 2023 2:19 am

每隔10ms发送一次方波是如何定时的?建议通过硬件定时器实现,因为延时函数不准确

Who is online

Users browsing this forum: No registered users and 21 guests