Close

Full Speed Ahead!

A project log for ESP-12F Raspberry Pi GPIO SDIO Wifi

Get fast Wifi via the Raspberry Pi GPIO header using the SDIO bus of the ESP8266. Also with audio jack for the zero.

jacksonliamjacksonliam 02/03/2016 at 19:259 Comments

As suggested by @haddyhad I've put the flash into sleep mode with the sleepflash.py utility I've added here https://github.com/jacksonliam/rpi-bitbang-spiflash. The flash seems to stay asleep through power cycles (at least short ones). And I enabled 4 bit SDIO mode.

Its possible that the driver could send the flash wake up command which would break comms with the module, but I'm not sure how likely it is that would happen.

453MB 5.8MB/s 00:42 ETA

Thats 46.4Mbit/s - The ESP8266 supposidly supports MCS7 / HT20 so in theroy you should be able to get near 72.2Mbit/s but according to iwconfig mines only connecting to my router at 54Mb.

Has anyone seen it sync higher than 54Mb?

Overclock to 62.5Mhz

I tried the overclock 'sdio_overclock=62' as suggested by @ajlitt but unfortunately the card doesn't start.

[    3.587837] mmc1: Got command interrupt 0x00030000 even though no command ope                                                                                                             ration was in progress.
[    3.587893] mmc1: Got command interrupt 0x00030000 even though no command ope                                                                                                             ration was in progress.
[    3.598324] mmc1: Controller never released inhibit bit(s).
[    3.648352] mmc-bcm2835 3f300000.mmc: no support for card's volts
[    3.648371] mmc1: Got command interrupt 0x00030000 even though no command ope                                                                                                             ration was in progress.
[    3.648414] mmc1: error -22 whilst initialising SDIO card
[    3.658962] mmc1: Controller never released inhibit bit(s).
and
[   46.476820] mmc-bcm2835 3f300000.mmc: no support for card's volts
[   46.476830] mmc1: error -22 whilst initialising MMC card
[   46.526554] mmc1: Controller never released inhibit bit(s).

Discussions

haddyhad wrote 02/03/2016 at 23:18 point

Awesome, thank you for testing and sharing this.  

  Are you sure? yes | no

David Lowe wrote 02/03/2016 at 22:00 point

Might there be a difference in the modules which allows my ESP-03 to function OK at 62.5MHz, whereas the ESP-12 doesn't? I've never seen it link at anything other than 54Mbps, thouigh I see only 10% of that as throughput. By "short power-cycle", are you saying the flash stays asleep after brief moments of no power? Wow, that's useful! How short?

  Are you sure? yes | no

jacksonliam wrote 02/03/2016 at 22:29 point

It looks like the ESP03 has much better routing for the flash (SDIO) traces. The esp chip is rotated 90 degrees in the Esp12 so the traces have further to go and the lines all run close together and through a few vias, over the VCC line and under the crystal. So that's probably why it works at 62.5Mhz on the esp 03. 

The ESP 12F has a much better RF design though, which I guess is why were getting better throughput. 

I unplugged the Pi for about 10 seconds to test it. Could be enough charge in the caps to keep it going I suppose. I'll leave it unplugged for a few hours tomorrow to see. 

  Are you sure? yes | no

ajlitt wrote 02/03/2016 at 22:38 point

I wish I knew what the difference is.  I spent another late night trying to figure out why one of my two custom boards works fine at 62.5MHz 1-bit but the other one and the ESP-12F boards don't.  I hooked up the TXD/RXD from the ESP in both cases, and both seem to come up in the same modes at the same times ((7,4) on cold boot, (7,7) on warm reset).  I did this because I wasn't sure that the pull on GPIO0 was coming up correctly since it also sinks the LED.

As for speed, I can get 40Mb/s all day on my 4-bit module at 41.66MHz, same as @jacksonliam.  I also get about 40Mb/s on my 1-bit module at 62.5MHz.  OpenWRT on my test router often says it's connected at 65Mb/s (MCS-6?).  SDIO 4-bit at 41.66MHz has a 166.62Mb/s data rate, while 1-bit at 62.5MHz obviously has 62.5Mb/s.  I'm beginning to think ~40Mb/s is the max real world throughput on this module...

I'm glad to see so much investigation around all of this.

  Are you sure? yes | no

David Lowe wrote 02/04/2016 at 10:59 point

I take that back... I tried a different access point and the esp-03 is connecting at 72.2Mbps. Nudging 41Mbps in 4-bit mode at 62.5MHz with the AP close by. Hurrah, good to join the 40Mbps club at last.

  Are you sure? yes | no

jacksonliam wrote 02/04/2016 at 19:34 point

Dammit, why won't mine sync at 72.2!

  Are you sure? yes | no

jacksonliam wrote 02/04/2016 at 19:37 point

FYI the flash appeared to still be asleep after being without power for about 20 hours.

  Are you sure? yes | no

David Lowe wrote 02/05/2016 at 06:13 point

Great, the flash is as good as gone!

  Are you sure? yes | no

ajlitt wrote 02/03/2016 at 20:05 point

Cool!  I'm really interested to hear how the flash hold works long-term.

  Are you sure? yes | no