mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
e6c1a4670cf04cd3290609abeb733ea3c38aff4f
The BK72xx SDK creates the main Arduino task at FreeRTOS priority 3, which is lower than all WiFi (4-5), LwIP (4), and TCP/IP (7) tasks. This causes the main loop to be preempted for ~100ms whenever WiFi background processing runs (beacon handling, DHCP, WPA supplicant). By contrast, RTL87xx creates its main task at osPriorityRealtime (the highest priority), so it never experiences this issue. Raise the BK72xx main task priority to 6 during arch_init(): above WiFi/LwIP tasks (4-5) so they don't preempt the main loop, but below the TCP/IP thread (7) so packet processing keeps priority. This is safe because ESPHome yields voluntarily via yield_with_select_() and the Arduino mainTask yield() after each loop() iteration. Tested on CB3S (BK7231N) - loop time drops from ~110ms to ~14ms.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
