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

ESP reboot does not work due to weak pin pull-up #4

Closed
awal123 opened this issue Aug 26, 2016 · 1 comment
Closed

ESP reboot does not work due to weak pin pull-up #4

awal123 opened this issue Aug 26, 2016 · 1 comment

Comments

@awal123
Copy link

awal123 commented Aug 26, 2016

In my board I used different GPIO than 0 for esp_reset_gpio and I had problem with ESP reseting. The reason of this was a weak pull-up on selected GPIO.

I updated sdio_stub.c file to solve this problem:

int rockchip_wifi_init_module(void)
{

  •    gpio_request(esp_reset_gpio,"esp_reset");
    
    return esp_sdio_init();
    }

void rockchip_wifi_exit_module(void)
{

  • gpio_free(esp_reset_gpio);
    esp_sdio_exit();
    }

void sif_platform_reset_target(void)
{
printk("ESP8089 reset via GPIO %d\n", esp_reset_gpio);

  • gpio_request(esp_reset_gpio,"esp_reset");
    gpio_direction_output(esp_reset_gpio,0);
    msleep(200);
  • gpio_direction_input(esp_reset_gpio);
  • gpio_direction_output(esp_reset_gpio,1);
  • gpio_free(esp_reset_gpio);
    }

I have no problem with reseting ESP now.

@al177
Copy link
Owner

al177 commented Nov 2, 2016

Thanks for the suggestion. Sorry for the high latency response...

I've built up a bunch of ESP-12F based boards for the Pi, and it seems that about 1 in 10 ESP-12F modules has a similar problem. On my board, CH_PD of the module is wired directly to GPIO0 of the Pi, but I suspect that others will have the same issue. On the couple of boards that failed my production test, a 4.7k pullup on CH_PD fixes the problem.

Your fix is fine if you are manually loading the module, but it doesn't help when relying on systemd to autoload the module. In order for that to happen, the ESP8266 must come out of reset on boot so that it responds to bus probes from the SDIO driver. For this situation a pullup is necessary.

@al177 al177 closed this as completed Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants