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

ability to read GPIO holder status (IDFGH-14018) #14841

Open
bryghtlabs-richard opened this issue Nov 6, 2024 · 4 comments · May be fixed by #14843
Open

ability to read GPIO holder status (IDFGH-14018) #14841

bryghtlabs-richard opened this issue Nov 6, 2024 · 4 comments · May be fixed by #14843
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF

Comments

@bryghtlabs-richard
Copy link
Contributor

Is your feature request related to a problem?

I need the ability to read the GPIO holder status per pin, so that I can discover the state of different peripherals after a restart.

Describe the solution you'd like.

I'd like a nice ESP-IDF GPIO interface to take a GPIO number and receive a boolean value if the pin-holder was enabled or disabled.

Describe alternatives you've considered.

No response

Additional context.

No response

@bryghtlabs-richard bryghtlabs-richard added the Type: Feature Request Feature request for IDF label Nov 6, 2024
@github-actions github-actions bot changed the title ability to read GPIO holder status ability to read GPIO holder status (IDFGH-14018) Nov 6, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 6, 2024
@bryghtlabs-richard
Copy link
Contributor Author

There is a related function, gpio_ll_is_digital_io_hold(), but nothing at the gpio.h level.

bryghtlabs-richard added a commit to bryghtlabs-richard/esp-idf that referenced this issue Nov 6, 2024
@songruo
Copy link
Collaborator

songruo commented Nov 7, 2024

Hi @bryghtlabs-richard,

From your PR description, I get your scenario is you need to hold the SPI LCD CS line during a restart (core reset), is that correct? Though you have held the CS pad before restart, after the system restarts, all the signal connection information will still get lost, so you will still have to re-configure the pin (assuming you are using esp_lcd_new_panel_io_spi()), and then eventually release the hold.

Is there any reason why you don't want to call esp_lcd_new_panel_io_spi() after the restart?

@bryghtlabs-richard
Copy link
Contributor Author

Hi @songruo ,

It's close but not exactly what you described. I'm using esp_lcd_new_panel_io_spi() for every startup.

If the CS/RST pins were held with pin-holders, then I know an earlier software run has already configured the display, so I need to avoid calling esp_lcd_panel_reset() and avoid initial startup register scripts to prevent displaying corruption to user.

If the CS/RST were not held with pin-holders, then the display needs to be fully booted, with esp_lcd_panel_reset() and initial startup register scripts and delays.

@songruo
Copy link
Collaborator

songruo commented Nov 8, 2024

@bryghtlabs-richard Do you think checking the chip reset reason with esp_rom_get_reset_reason() can also achieve the purpose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants