eFuse

  • efuse

On ESP32-C6, GPIO27 defaults to VDD_SPI. After running espefuse -p COM12 burn_efuse VDD_SPI_AS_GPIO 1 to change it to GPIO mode, why does toggling the pin still fail after reboot?

On ESP32-C6, GPIO27 is mapped to VDD_SPI by default. Unlocking the pin as GPIO through eFuse alone is not enough. You must also power down the corresponding peripheral power domain in software; otherwise the pin remains high and cannot be driven as a normal GPIO.

//包含头文件
#include "soc/pmu_reg.h"
//执行寄存器写入
REG_SET_FIELD(PMU_POWER_VDD_SPI_CNTL_REG, PMU_VDD_SPI_PWR_SEL_SW, 1);
REG_SET_FIELD(PMU_POWER_VDD_SPI_CNTL_REG, PMU_VDD_SPI_PWR_SW, 0);
//配置GPIO
...

Does ESP32 provide a tool for burning a custom MAC address?

Yes. You can use espefuse.py to burn a custom MAC address.

Reference:
https://docs.espressif.com/projects/esptool/en/latest/esp32/espefuse/burn-custom-mac-cmd.html

Tool download:
https://github.com/espressif/esptool/releases

Notes:

  1. This is a one-time operation and cannot be changed after burning.
  2. It affects both Wi-Fi and Bluetooth MAC addresses.
  3. The address must follow a valid MAC address format.
  4. It is recommended to back up the original MAC address before burning.