2 comments

  • the__alchemist1 hour ago
    Very good article!<p>Anecdote about this summary at the bottom: &gt; This setup gives you the best of both worlds: ESP-IDF and FreeRTOS manage Wi-Fi, BLE, and system tasks on Core 0, while Core 1 runs your bare-metal Rust code at full speed with zero scheduler interference.<p>I am doing something somewhat like this, but with separate MCUs instead of separate cores. I flashed Esp-Hosted-MCU onto an ESP-32 (C3, but any including S3 will work). This is official firmware which turns the ESP into a &quot;radio co-processor&quot;, so you can treat it like a SPI or UART Wi-Fi&#x2F;BLE chip.<p>On another MCU (STM32), I run bare-metal firmware in rust which talks to the radio over SPI. Wi-Fi uses the ESP IDF, and BLE uses standard HCI commands.
    • sottol50 minutes ago
      Interestingly, Espressif nowadays does something similar on the ESP32-P4 which is RiscV but doesn&#x27;t have builtin Wifi&#x2F;BT. So they tend to pair it with an ESP32-C6 which runs the WiFi stack and firmware that communicates with the P4 using SDIO. Not bare metal though, but similar dual-mcu setup for wifi&#x2F;bt.
  • fjfaase2 hours ago
    I think you can run a single task on core 1 without interference if you give it the right priority (and disable some things).
    • barbegal1 hour ago
      Yes you can pin it to core 1 whilst pinning all other tasks to core 0. Then will never be interrupted or preempted (except by interrupts created on core 1)