The in-tree esp32s3-xiao board bringup never wires up Wi-Fi at all -- unlike esp32s3-devkit/esp32s3-eye, it has no `#ifdef CONFIG_ESPRESSIF_WIFI` include of esp32s3_board_wlan.h and no call to board_wlan_init(). Add both, mirroring those boards' pattern and placement exactly. On its own this is not enough for a board that also uses CONFIG_PM: Wi-Fi's PHY/RF calibration inside board_wlan_init() cannot tolerate the clock gating of PM_STANDBY (light sleep). If the idle task enters light sleep while phy_init's calibration is still running -- which the greedy governor is free to do the moment the CPU goes idle during driver init -- the calibration hangs forever waiting on a clock that just stopped. Confirmed on real XIAO ESP32-S3 hardware: with CONFIG_PM + CONFIG_ESPRESSIF_WIFI both enabled and no guard, boot got stuck 100% of the time right after the "net80211 rom version" line, before phy_init ever printed, and never reached NSH -- reproducible across repeated flashes, 50s+ waits, not even responding to a UART wakeup keypress (a genuine hang, not quiet sleep). Fixed by holding a stronger PM lock than PM_STANDBY for the duration of board_wlan_init(): pm_stay(PM_IDLE_DOMAIN, PM_IDLE) blocks PM_STANDBY/PM_SLEEP while still allowing normal CPU idle, and pm_relax() releases it immediately after, restoring whatever floor the board's own PM policy holds otherwise. Confirmed fixed on the same hardware: boots clean to NSH with Wi-Fi + PM enabled together, `ps` shows the wifi/netdev-wlan0 kernel threads running, and `wapi scan`/ `ifup wlan0` work normally. esp32c3-devkit and esp32c6-devkit also combine CONFIG_PM with Wi-Fi, but don't need this guard today: both call board_wlan_init() well before esp_pmconfigure() (which is what actually arms the PM governor) runs near the end of bringup, so PM isn't active yet during their Wi-Fi init. This board's PM handling begins earlier in bringup, so the two can race here. Signed-off-by: Felipe Moura <moura.fmo@gmail.com> Assisted-by: Claude:claude-sonnet-5 |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.