J. Nick Koston e6c1a4670c [bk72xx] Fix ~100ms loop stalls by raising main task priority
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.
2026-03-02 13:48:26 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-12 23:04:19 +13:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
S
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%