al177 / esp8089

Linux kernel module driver for the ESP8089 WiFi chip
GNU General Public License v2.0
185 stars 114 forks source link

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

Closed awal123 closed 8 years ago

awal123 commented 8 years ago

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) {

void rockchip_wifi_exit_module(void) {

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

I have no problem with reseting ESP now.

al177 commented 8 years ago

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.