Skip to content

bsp_p4_eye_init() resets ESP32-C6 coprocessor via rtc_gpio_init(BSP_C6_EN_PIN) (AEGHB-1252) #135

@AlverGant

Description

@AlverGant

Hi, I was having difficulties using UART communication between P4 and C6 with my custom firmware and after some debugging I initially suspected DMA interference or electrical noise from XCLK, but testing confirmed the issue is purely software-related (RTC GPIO reconfiguration).

Environment

  • Development Kit: (ESP32-P4-EYE)
  • ESP-IDF Version: v5.5.1
  • BSP Version: espressif/esp32_p4_eye from esp-dev-kits (commit 602c810)
  • Affected Component: bsp_p4_eye_init() in esp32_p4_eye.c
  • Hardware Setup:
    • ESP32-P4 (main processor)
    • ESP32-C6 (coprocessor for WiFi/Bluetooth communication via UART2)

Problem Description

When using the ESP32-P4-EYE board with an ESP32-C6 coprocessor communicating via UART, calling bsp_p4_eye_init() resets the C6, breaking UART communication.

The issue is caused by this line in esp32_p4_eye.c:368:

rtc_gpio_init(BSP_C6_EN_PIN);  // GPIO 9

This reconfigures the C6's enable pin (GPIO 9), causing the C6 to reset and lose its initialized state (WiFi connection, network stack, etc.).

Impact

This affects any application that:

  1. Uses the BSP (bsp_p4_eye_init()) to initialize the board
  2. Relies on ESP32-C6 coprocessor for network connectivity
  3. Needs the C6 to remain running after P4 initialization

Symptoms:

  • C6 stops responding to UART commands after bsp_p4_eye_init()
  • UART communication works perfectly in isolated tests
  • C6 must be re-initialized after P4 BSP init, losing connection state

Steps to Reproduce

  1. Setup: Connect ESP32-C6 to ESP32-P4 via UART2 (TX: GPIO35, RX: GPIO36)
  2. C6 Firmware: Initialize WiFi and wait for connection
  3. P4 Firmware:
    • Wait for C6 to signal ready (e.g., "C6_READY" via UART)
    • Call bsp_p4_eye_init()
  4. Observe: C6 stops responding, UART communication fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions