Skip to Content

Getting Started with FireBeetle 2 ESP32-P4 board

Getting Started with FireBeetle 2 ESP32-P4 board

The FireBeetle 2 ESP32-P4 is a development board designed around Espressif’s ESP32-P4 microcontroller. Unlike previous ESP32 series chips, the P4 is optimized as a high-performance application processor and does not integrate wireless connectivity directly. To provide network capability, the board includes an auxiliary ESP32-C6 that handles Wi-Fi 6 and Bluetooth 5 communication.

The FireBeetle 2 ESP32-P4 integrates common development features such as USB Type-C programming, a microSD card slot, and an on-board PDM microphone. It exposes a range of GPIO pins, supports various peripheral interfaces, and is compatible with both Arduino and ESP-IDF development environments. However, support for the Arduino environment is still under development and as of September of 2025 not all functionality is yet available.

In this tutorial, we will cover some of the features of the FireBeetle 2 ESP32-P4 and walk through practical examples, including GPIO control, SD card access and Wi-Fi communication.

Required Parts

You will need a FireBeetle 2 ESP32-P4 board with or without the extension board and a USB-C cable to program the board and to try out the code examples.

FireBeetle 2 ESP32-P4 AI Development Kit

USB C Cable

Makerguides is a participant in affiliate advertising programs designed to provide a means for sites to earn advertising fees by linking to Amazon, AliExpress, Elecrow, and other sites. As an Affiliate we may earn from qualifying purchases.

The FireBeetle 2 ESP32-P4 board

The FireBeetle 2 ESP32-P4 development board is built around Espressif’s ESP32-P4 system-on-chip, which provides a dual-core RISC-V processor designed for high-performance embedded applications.

The ESP32-P4 integrates a wide set of peripheral interfaces, including multiple UART, SPI, I²C, I²S, PWM, ADC, and DAC channels, along with support for MIPI-CSI and MIPI-DSI interfaces intended for camera and display connectivity. On this board, the ESP32-P4 is paired with 16 MB of external flash memory, enabling both application storage and data logging.

Coprocessor

Since the ESP32-P4 does not incorporate wireless connectivity, the board includes a secondary processor, the ESP32-C6, which functions as a dedicated coprocessor for Wi-Fi 6 (802.11ax) and Bluetooth 5.0 communication. The P4 and C6 are connected internally, allowing the host processor to access wireless networking through standard APIs while leaving the P4’s cores fully available for application-level tasks.

Front and Back of FireBeetle 2 ESP32-P4 board
Front and Back of FireBeetle 2 ESP32-P4 board (source)

Interfaces

The FireBeetle 2 ESP32-P4 provides multiple options for external interfacing and expansion. A USB Type-C connector is present, offering both USB CDC for programming and debugging, as well as USB OTG 2.0 support for high-speed device interfacing. The board exposes general-purpose I/O pins on dual headers. For multimedia applications, the board includes dedicated MIPI-CSI and MIPI-DSI connectors, supporting camera input and display output with high data throughput. A microSD card slot is integrated for external storage, and an onboard PDM digital MEMS microphone (MSM261DGT003) is available for audio input, connected through the I²S peripheral of the P4.

Components

Additional onboard components include a reset button, a boot/IO35 button for entering programming modes, and status LEDs for power and general I/O indication. Power regulation circuitry allows the board to be powered from the USB-C connector or external supply. The combination of high-performance processing, external memory, multimedia interfaces, wireless connectivity via coprocessor, and integrated peripherals makes the FireBeetle 2 ESP32-P4 a flexible development platform for applications such as human–machine interfaces, IoT data acquisition, multimedia processing, and edge AI workloads.

Expansion Board

You can get the FireBeetle 2 ESP32-P4 board with an Expansion board. The Expansion board has no additional electronics but expands the number of pins you can connect to. The picture below shows the Expansion board at the top and the actual FireBeetle 2 ESP32-P4 board at the bottom:

FireBeetle 2 ESP32-P4 (bottom) with Expansion Board (top)
FireBeetle 2 ESP32-P4 (bottom) with Expansion Board (top) (source)

The board is simply inserted into the dual pin header at the top of the Expansion board.

Technical Specification

FeatureDetails
Main MCUEspressif ESP32-P4, dual-core RISC-V, up to 400 MHz
CoprocessorEspressif ESP32-C6, Wi-Fi 6 (802.11ax) and Bluetooth 5.0
Flash Memory16 MB external QSPI flash
PSRAMSupported (depends on variant)
USBUSB Type-C, USB CDC for programming and serial, USB 2.0 OTG HS support
StorageMicroSD/TF card slot (SDIO interface)
AudioOnboard MSM261DGT003 PDM digital microphone (I²S interface)
Display InterfaceMIPI-DSI connector
Camera InterfaceMIPI-CSI connector
GPIOMultiple general-purpose I/O pins exposed on dual headers, 3.3 V logic
Analog InputsIntegrated ADC channels (ESP32-P4)
PWM / TimersMultiple PWM channels for motor or LED control
ConnectivityWi-Fi 6, Bluetooth 5.0 (via ESP32-C6 coprocessor)
ButtonsReset button, BOOT/IO35 button
IndicatorsPower LED, user-programmable LED (IO3)
Operating Voltage3.3 V logic (powered via USB-C or external source)
Board DimensionsFireBeetle form factor (compatible with other FireBeetle series boards)

The table above summarizes the technical specification of the FireBeetle 2 ESP32-P4 for additional information see the Product Page, the Wiki and the Schematics linked below:

ESP32-P4 versus ESP32-S3

The ESP32-P4 and ESP32-S3 are both members of Espressif’s ESP32 family, but they are designed with different priorities in mind. The ESP32-S3 is a connectivity-focused microcontroller that integrates Wi-Fi and Bluetooth radios alongside a dual-core processor, while the ESP32-P4 is a higher-performance application processor without integrated wireless, intended for multimedia and compute-heavy tasks.

ESP32-S3

The ESP32-S3 features a dual-core Xtensa LX7 processor running up to 240 MHz, optimized for AI acceleration and general IoT tasks. It includes vector instructions for machine learning workloads, integrated Wi-Fi 4 (802.11 b/g/n), and Bluetooth 5 (LE), making it suitable for connected devices such as smart home products, wearable electronics, and sensor hubs. The S3 supports up to 512 KB of internal SRAM, external PSRAM, and has a typical ESP32 peripheral set including SPI, I²C, UART, I²S, PWM, and ADC. Its balance of connectivity, compute power, and AI acceleration makes it a versatile SoC for networked applications.

ESP32-P4

In contrast, the ESP32-P4 is based on a dual-core RISC-V processor running up to 400 MHz, providing a significant increase in raw compute capability compared to the S3. Unlike the S3, it does not include Wi-Fi or Bluetooth directly; instead, boards such as the FireBeetle 2 ESP32-P4 pair it with a dedicated connectivity coprocessor (e.g., ESP32-C6). The P4 expands its focus toward high-performance peripherals, integrating interfaces not found on the S3 such as MIPI-CSI and MIPI-DSI for camera and display applications, USB 2.0 OTG with high-speed support, and a richer selection of I/O. With support for large external memory and advanced peripherals, the ESP32-P4 is designed for applications such as human–machine interfaces, multimedia devices, edge computing, and embedded vision systems.

Summary

In summary, the ESP32-S3 is a connectivity-centric SoC with moderate compute resources and built-in AI acceleration, best suited for Wi-Fi and Bluetooth enabled IoT devices. The ESP32-P4, on the other hand, is a higher-performance RISC-V processor without native wireless but with advanced multimedia and interface options, targeting applications that require more computational throughput and richer peripheral support, often with wireless handled by an external coprocessor.

FeatureESP32-P4ESP32-S3
CPU ArchitectureDual-core RISC-V (RV32IMAC)Dual-core Xtensa LX7
Max CPU FrequencyUp to 400 MHzUp to 240 MHz
WirelessNone (external coprocessor required, e.g., ESP32-C6)Integrated Wi-Fi 4 (802.11 b/g/n) + Bluetooth 5 (LE)
Internal SRAM~768 KB (configurable, + external support)512 KB
External MemoryUp to 32 MB flash, optional PSRAM (board dependent)Up to 16 MB flash, optional PSRAM
AI / AccelerationGeneral RISC-V DSP extensionsVector instructions for ML/AI acceleration
USB SupportUSB 2.0 OTG (High-Speed 480 Mbps)USB 1.1 OTG (Full-Speed 12 Mbps)
Multimedia InterfacesMIPI-DSI (Display), MIPI-CSI (Camera)LCD interface (8/16-bit parallel), no MIPI
Audio InterfacesI²S / PDM, up to multiple channelsI²S / PDM, up to multiple channels
Other PeripheralsSPI, I²C, UART, PWM, ADC, DAC, SDIO, GPIOSPI, I²C, UART, PWM, ADC, DAC, SDIO, GPIO
SecurityAES, SHA, RSA, ECC, HMAC, Secure Boot, TrustZone (PMP)AES, SHA, RSA, ECC, HMAC, Secure Boot
Target ApplicationsHMI, multimedia, vision, audio processing, edge computingIoT, smart devices, wearables, sensor hubs

Installation of ESP32 Core

If this is your first project with a board of the ESP32 series, you will need to install the ESP32 core first. If ESP32 boards are already installed in your Arduino IDE, you can skip this section.

Start by opening the Preferences dialog by selecting “Preferences…” from the “File” menu. This will open the Preferences dialog shown below.

Under the Settings tab you will find an edit box at the bottom of the dialog that is labelled “Additional boards manager URLs“:

Additional boards manager URLs in Preferences
Additional boards manager URLs in Preferences

In this input field copy the following URL:

https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

This will let the Arduino IDE know, where to find the ESP32 core libraries. Next we will install the ESP32 boards using the Boards Manager.

Open the Boards Manager via “Tools -> Boards -> Board Manager”. You will see the Boards Manager appearing in the left Sidebar. Enter “ESP32” in the search field at the top and you should see two types of ESP32 boards; the “Arduino ESP32 Boards” and the “esp32 by Espressif” boards. We want the “esp32 libraries by Espressif”. Click on the INSTALL button and wait until the download and install is complete.

Install ESP32 Core libraries
Install ESP32 Core libraries

Selecting Board

Finally we need to select a ESP32 board. In case of the FireBeetle 2 ESP32-P4 board, we pick the generic “ESP32P4 Dev Module”. For that, click on the drop-down menu and then on “Select other board and port…”:

Drop-down Menu for Board Selection
Drop-down Menu for Board Selection

This will open a dialog where you can enter “esp32p4” in the search bar. You will see the “ESP32P4 Dev Module” board under Boards. Click on it and the COM port to activate it and then click OK:

Board Selection Dialog "ESP32P4 Dev Module" board
Board Selection Dialog “ESP32P4 Dev Module” board

Note that you need to connect the board via the USB cable to your computer, before you can select a COM port. The board has two USB ports. For programming you need to use the port at the short side of the board:

USB Port for Serial Communication
USB Port for Serial Communication

Tool Settings

In the next sections you will find code examples for the various hardware components of the board and you will need the following settings to make them work. You can find those settings under the Tools menu:

Settings for FireBeetle 2 ESP32-P4
Settings for FireBeetle 2 ESP32-P4

Most importantly Flash Size is set to 16MB(128MB), Partition Scheme is set to 16M Flash (3MB APP/9.9MB FATFS), PSRAM is set to Enabled.

You also need to set USB Mode to Hardware CDC and JTAG, otherwise serial communication will not work and Serial.print() will not print anything on the Serial Monitor, for instance. The other settings should be the default settings.

Code Example: Serial Communication

We start by testing the Serial communication. Open your Arduino IDE, enter the following code and upload the code to the FireBeetle 2 ESP32-P4 board.

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("test");
  delay(5000);
}

You should see the text “test” printed on the Serial Monitor. If not then check that the baud rate is set to 115200, that USB Mode is set to “Hardware CDC and JTAG” and that your USB cable is plugged into the correct port:

USB Port for Serial Communication
USB Port for Serial Communication

Code Example: Built-in LED

The FireBeetle 2 ESP32-P4 board has a built-in LED connected to GPIO 3. The code below is the classical Blink example that allows you to test the function of the built-in LED. It switches the LED on and off every second:

#define LED_BUILTIN 3

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

Code Example: GPIO

I tested the GPIO by connecting an LED with a 220 Ohm resistor to GPIO 36 and GND as shown below:

Connecting LED to GPIO36

The following code uses PWM (Pulse Width Modulation) to slowly change the brightness of the LED:

#define LED_PIN 36

void setup() {
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  for (int b = 0; b < 255; b++) {
    analogWrite(LED_PIN, b);
    delay(10);
  }
}

Next, I added a switch (SW) between GPIO33 and GND to test the input side of the GPIO as shown in the following circuit:

Connecting LED and Switch (SW) to GPIO
Connecting LED and Switch (SW) to GPIO

The following code tests if you can switch the LED on or off by flipping the switch (SW):

#define BUTTON_PIN 33
#define LED_PIN 36

void setup() {
  pinMode(BUTTON_PIN, INPUT_PULLUP);
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  int state = digitalRead(BUTTON_PIN);

  if (state == LOW) {   
    digitalWrite(LED_PIN, LOW);
  } else {
    digitalWrite(LED_PIN, HIGH);
  }

  delay(100);
}

Code Example: I2C and OLED

To test the I2C communication I connected an OLED. The hardware I2C pins of the FireBeetle 2 ESP32-P4 are SCL=8, SDA=7. In addition you need to connect GND and VCC to 3V3. The photo below shows the wiring on a breadboard:

OLED connected to FireBeetle 2 ESP32-P4 via I2C
OLED connected to FireBeetle 2 ESP32-P4 via I2C

The following code initializes the display and then prints the text “make” on the OLED:

#include "Adafruit_SSD1306.h"

Adafruit_SSD1306 oled(128, 64, &Wire, -1);

void setup() {
  oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  oled.setTextSize(4);
  oled.setTextColor(WHITE);
}
void loop() {
  oled.clearDisplay();
  oled.setCursor(20, 16);
  oled.print("make");
  oled.display();
  delay(1000);
}

If you want to see more examples of OLED applications have a look at our How to use the MQ-2 Gas Sensor with Arduino and an OLED, the Spectrum Analyzer with ESP32 and MAX4466 and the TFmini-Plus Distance Sensor with Arduino tutorials.

Code Example: SD Card

In the next example we are going to test the SD Card interface. You will have to inserted a formatted SD card into the SD Card slot for this example to work.

SD Card Interface
SD Card Interface

The following code writes a file (test.txt) with the text “Hello from FireBeetle 2” to the SD Card and reads the file contents back:

#include "FS.h"
#include "SD_MMC.h"

#define SD_POWER 21  // SD1_PWRN

void setup() {
  Serial.begin(115200);
  delay(1000);

  // Enable SD card power
  pinMode(SD_POWER, OUTPUT);
  digitalWrite(SD_POWER, HIGH);
  delay(10);

  Serial.println("Mounting SD card...");

  if (!SD_MMC.begin("/sdcard", true)) {  // true = 1-bit mode if needed
    Serial.println("Card Mount Failed");
    return;
  }

  uint8_t cardType = SD_MMC.cardType();
  if (cardType == CARD_NONE) {
    Serial.println("No SD card attached");
    return;
  }

  Serial.println("SD card mounted");

  // ---- Write test ----
  File file = SD_MMC.open("/test.txt", FILE_WRITE);
  if (!file) {
    Serial.println("Failed to open file for writing");
    return;
  }
  file.println("Hello from FireBeetle 2");
  file.close();
  Serial.println("Write finished.");

  // ---- Read back ----
  file = SD_MMC.open("/test.txt");
  if (!file) {
    Serial.println("Failed to open file for reading");
    return;
  }

  Serial.println("Reading file contents:");
  while (file.available()) {
    Serial.write(file.read());  // print byte by byte
  }
  file.close();
  Serial.println("\nRead finished.");
}

void loop() { }

Writing and reading from the SD Card is using the usual functions but not that you have to switch on the power for the SD card by setting GPIO 21 to high before you can use the SD Card interface.

Code Example: WiFi

In the last example we test the WiFi via the ESP32-C6 coprocessor. Luckily, you don’t need to do anything special. The code below opens a web page on your computer and shows the text “Hello from FireBeetle”:

#include <WiFi.h>
#include <WebServer.h>

const char* ssid = "SSID";
const char* password = "PASSWORD";

WebServer server(80);

void handleRoot() {
  server.send(200, "text/html",
              "<h1>Hello from FireBeetle</h1>");
}

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("ESP32-P4 Web Server test");

  WiFi.begin(ssid, password);
  Serial.printf("Connecting to %s", ssid);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("\nWiFi connected!");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());

  server.on("/", handleRoot);
  server.begin();
  Serial.println("Open the IP above in your browser.");
}

void loop() {
  server.handleClient();
}

Note that you have to change the constants for the ssid and password but there is no special configuration for using the ESP32-C6 coprocessor required.

Conclusions

The FireBeetle 2 ESP32-P4 combines Espressif’s high-performance ESP32-P4 processor with an ESP32-C6 coprocessor to deliver both strong application processing and modern wireless connectivity. With its large flash memory, microSD card support, onboard PDM microphone, and dedicated MIPI-CSI/DSI interfaces, the board is aimed at AI and multimedia applications.

Note that I could not get the onboard PDM microphone to work, which may be due to incomplete support for the ESP32-P4 in the current Arduino core (3.x). Similarly, I did not tried the CSI and DSI ports, since as far as I know they are not yet supported (Sep 2025). However, they work if you are willing to use ESP-IDF. See the Camera Server Using FireBeetle 2 ESP32P4 tutorial.

Bluetooth functionality also could not be tested successfully, since the standard ArduinoBLE and BluetoothSerial libraries are not yet compatible with the ESP32-P4; although BLE is handled by the onboard ESP32-C6 coprocessor, the necessary APIs are not fully exposed in the Arduino core at this time it seems.

As the Arduino core for ESP32-P4 matures and more of the ESP-IDF functionality is exposed, it is expected that peripherals such as the PDM microphone, CSI, DSI, and BLE will become easier to use in Arduino sketches.

If you have any questions feel free to leave them in the comment section.

Happy Tinkering 😉

Ralph

Sunday 28th of December 2025

When I try the wifi sketch, it does not work, giving

E (8994) sdmmc_io: sdmmc_init_io: sdmmc_io_send_op_cond (1) returned 0x107 E (8994) sdio_wrapper: sdmmc_card_init failed E (9234) sdio_wrapper: sdio_card_fn_init failed E (9364) sdmmc_io: sdmmc_io_read_byte: sdmmc_io_rw_direct (read 0x2) returned 0x107 E (9365) sdio_wrapper: sdio_card_fn_init failed E (9465) H_SDIO_DRV: card init failed E (9465) transport: ensure_slave_bus_ready failed ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x40042b0a file: "./managed_components/espressif__esp_hosted/host/api/src/esp_hosted_api.c" line 156 func: esp_hosted_reconfigure expression: transport_drv_reconfigure() E (9483) H_API: ESP-Hosted link not yet up

Stefan Maetschke

Sunday 28th of December 2025

Hi, this error message relates to an issue with the SD Card.