Giter Club home page Giter Club logo

esp8089-spi's Introduction

ESP8089-SPI

Linux kernel module to use ESP8089 / ESP8266 over SPI. Intended for use with Raspberry Pi Zero.

Hardware

If using an ESP8089, no changes are required to be made to the chip. If using an ESP8266, the SPI flash must first be desoldered. This is the 8-pin SOIC component near the 32-pin QFN die. The ESP-201 variation works well for this. Alternatively, one can use an off-brand NodeMCU or WeMos D1 Mini, albeit a version that doesn't use the ESP-12.

What pins go where:

Raspberry Pi ESP8266 / ESP8089 Function
BCM 13 CHIP_EN esp_reset_gpio
BCM 16 GPIO10 / SDIO_DATA_3 esp_cs0_pin
BCM 19 GPIO7 / SDIO_DATA_0 MISO
BCM 20 GPIO11 / SDIO_CMD MOSI
BCM 21 GPIO6 / SDIO_CLK SCLK
BCM 26 GPIO8 / SDIO_DATA_1 esp_interrupt
3.3V GPIO15 / MTDO boot select
3.3V GPIO0 boot select
GND GPIO2 boot select

It may be advisable to add a resistor across each I/O pin (33 ~ 330 Ohm).

Software

Start with a fresh install of Raspbian.

Step one: prerequisites

sudo apt-get -y update

sudo apt-get -y upgrade

sudo apt-get -y dist-upgrade

sudo apt-get -y install raspberrypi-kernel-headers gcc git make

Step two: install

mkdir ~/esp

cd ~/esp

git clone https://github.com/notabucketofspam/ESP8089-SPI.git

cd ESP8089-SPI

sudo make install

Step three: configure

sudo su

echo "options esp8089-spi esp_reset_gpio=13 esp_cs0_pin=16 esp_interrupt=26" > /etc/modprobe.d/esp.conf

echo "esp8089_spi" >> /etc/modprobe.d/blacklist

echo "spi_bcm2835" >> /etc/modules

echo "spi_bcm2835aux" >> /etc/modules

echo "esp8089_spi" >> /etc/modules

echo "dtoverlay=spi1-1cs,cs0_pin=16,cs0_spidev=disabled" >> /boot/config.txt

reboot

How it works

The ESP8266 is basically just a rehashed ESP8089, which is a wireless chip commonly used in many Unix-based devices. The ESP8089 is designed to load its firmware over SPI / SDIO when the device in question boots, whereas the ESP8266 is intended to load firmware off of the integrated SPI flash component. The pins used for this operation, though, are exposed on most varieties of the chip. These pins can be therefore utilized to load any custom firmware onto an ESP8266; in fact, this is what the eagle_fw#.h files are. The SPI flash must first be removed to do this.

Upon boot of the host device, the ESP chip is power cycled using the CHIP_EN pin (held low) and subsequently set to load code over SPI via GPIO15 (held high). During this time, GPIO0 must be held high and GPIO2 must be held low to select the correct boot mode.

References

https://pinout.xyz/pinout/spi

https://hackaday.io/project/8678-rpi-wifi

https://github.com/al177/esp8089

https://github.com/george-hopkins/esp8089-spi

https://github.com/linux-rockchip/linux-rockchip/tree/mirror/rk3188-rbox-kk/drivers/net/wireless/esp8089

https://static.abstore.pl/design/accounts/soyter/img/dokumentacje/esp8089-driver-release-desc_v1-9-2_english.pdf

https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf

https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf

http://gamma.spb.ru/images/pdf/esp8089_datasheet_en.pdf

https://www.terraelectronica.ru/pdf/show?pdf_file=%252Fds%252Fpdf%252FE%252FEspressif_FAQ_EN.pdf

https://www.signal.com.tr/pdf/cat/8n-esp8266_spi_reference_en_v1.0.pdf

https://www.espressif.com/sites/default/files/documentation/ESP8266_Pin_List_0.xls

esp8089-spi's People

Contributors

notabucketofspam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.