Skip to content

esp32/ldo: Can't recreate adjustable LDO after soft reboot. #19008

@sfe-SparkFro

Description

@sfe-SparkFro

Port, board and/or hardware

esp32 port, any board with ESP32-P4

MicroPython version

MicroPython v1.28.0-preview.312.g2dc2e30d98 on 2026-03-26; Generic ESP32P4 module with WIFI module of external ESP32C6 with ESP32P4

Reproduction

Test code:

import esp32
esp32.LDO(4, 3300, adjustable=False)

Procedure:

  1. Run test code
  2. Soft reboot (Ctrl+D)
  3. Run test code
  4. Repeat with adjustable=True

Expected behaviour

Should be able to create LDO object after soft reboot regardless of value of adjustable.

Observed behaviour

Can only create LDO object after soft reboot if adjustable=False. If adjustable=True, the LDO can't be acquired:

>>> import esp32
>>> esp32.LDO(4, 3300, adjustable=True)
LDO(channel=4, voltage=3300mV)
>>> 
MPY: soft reboot
MicroPython v1.28.0-preview.312.g2dc2e30d98 on 2026-03-26; Generic ESP32P4 module with WIFI module of external ESP32C6 with ESP32P4
Type "help()" for more information.
>>> import esp32
>>> esp32.LDO(4, 3300, adjustable=True)
E (6470) ldo: esp_ldo_acquire_channel(109): can't acquire the channel, already in use by others or not adjustable
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: (-258, 'ESP_ERR_INVALID_ARG')
>>> 

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions