Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32-c6-wroom-1 some pins pulses after waking from sleep (IDFGH-12085) #13143

Closed
3 tasks done
Suxsem opened this issue Feb 8, 2024 · 4 comments
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@Suxsem
Copy link

Suxsem commented Feb 8, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I'm building a zigbee sleepy device that wakes up every 7 seconds and light sleep for most of the time.
For power consumption I'm using
CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y

Unfortunately there is a big issue: every time the board wakes up from light sleep, some pins, i.e. IO23 but I think all SDIO related pins, briefly pulses high, causing an unwanted interrupt in an attached external device.

I read from datasheet that IO23 at reset is WPU, so one would expect a brief high pulse when the chip is power up, but not every time it wakes up from light sleep.

I really hope there is a solution for this problem because I already produced pcbs and cannot change pins assignment.

Thank you

@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 8, 2024
@github-actions github-actions bot changed the title Esp32-c6-wroom-1 some pins pulses after waking from sleep Esp32-c6-wroom-1 some pins pulses after waking from sleep (IDFGH-12085) Feb 8, 2024
@esp-wzh
Copy link
Collaborator

esp-wzh commented Feb 18, 2024

Hi, @Suxsem, if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is not enabled, will the problem still occur?

If CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is enabled, you need to call gpio_hold_dis before each GPIO configuration and call gpio_hold_en afterwards

@Suxsem
Copy link
Author

Suxsem commented Feb 18, 2024

It works!! Thank you!

But why is that?

@esp-wzh
Copy link
Collaborator

esp-wzh commented Feb 18, 2024

On the esp32c6 the GPIO belongs to the peripheral power domain, if you enable CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP, the peripheral power domain will be turned off during lightsleep, meaning that all configurations to the GPIO will be lost and the GPIO will not maintain its state during sleep. After waking up the esp32c6 will use the dedicated retention DMA to restore the GPIO configuration, so the state of the GPIO is only correct in the active state, if you need to maintain the GPIO state during sleep, you need to call the gpio_hold_en to latch the configuration on the GPIO PADs

@Suxsem
Copy link
Author

Suxsem commented Feb 18, 2024

Understood, thank you. Maybe you could document it somewhere. Can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants