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

IO8 did not maintain the previous level state after entering deep sleep (IDFGH-5738) #7455

Closed
zarockfat opened this issue Aug 23, 2021 · 0 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@zarockfat
Copy link

Environment

  • Module or chip used: ESP32-C3
  • IDF version : v4.4-dev-1254-g639e7ad49
  • Build System: idf.py
  • Compiler version : xtensa-esp32-elf-gcc (crosstool-NG esp-2020r3) 8.4.0
  • Operating System: Linux
  • Using an IDE?: No
  • Power Supply: external 3.3V

Problem Description

Expected Behavior

I want to keep the previous pin level state after IO8 enters deep sleep

Actual Behavior

After entering deep sleep, IO8 did not maintain the previous low level state, but changed to the high level state

Steps to reproduce

  1. before entering deep sleep, I output IO8 to low level
  2. and then call gpio_hold_en(), gpio_deep_sleep_hold_en(), esp_deep_sleep_start( )
  3. After entering deep sleep, IO8 did not maintain the previous low level state, but changed to the high level state

Code to reproduce this issue

#include <stdio.h>
#include "sdkconfig.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_check.h"
#include "esp_sleep.h"


#define TEST_GOIO  GPIO_NUM_8

static const char *TAG = "debug";


void app_main(void)
{
	const gpio_config_t config = {
		.pin_bit_mask = BIT(TEST_GOIO),
		.mode = GPIO_MODE_OUTPUT,
		.pull_down_en = GPIO_PULLDOWN_ENABLE,
		.pull_up_en = GPIO_PULLUP_DISABLE,
	};	
		
	ESP_ERROR_CHECK(gpio_config(&config));
	ESP_ERROR_CHECK(gpio_set_level(TEST_GOIO, 0));

	ESP_LOGI(TAG, "Measure the pin voltage here ===Line:%d \ n", __LINE__);
	vTaskDelay(2000 / portTICK_RATE_MS);
	ESP_LOGI(TAG, "Measure the pin voltage here ===Line:%d \n", __LINE__);

	ESP_ERROR_CHECK(gpio_hold_en(TEST_GOIO));	
	gpio_deep_sleep_hold_en();
	

	esp_deep_sleep_start();	
}
@espressif-bot espressif-bot added the Status: Opened Issue is new label Aug 23, 2021
@github-actions github-actions bot changed the title IO8 did not maintain the previous level state after entering deep sleep IO8 did not maintain the previous level state after entering deep sleep (IDFGH-5738) Aug 23, 2021
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Resolution: NA Issue resolution is unavailable labels Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

2 participants