What are ESP32 SPI Ports for Micropython SPI(1)?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Posts: 2
Joined: Sat Jan 30, 2016 11:06 am

What are ESP32 SPI Ports for Micropython SPI(1)?

Postby choies » Sat May 20, 2017 4:23 pm

I make bin files for ESP32 module( ESP-WROOM-32)
Now I would like to test hardware SPI function using Micropython.

Please let me know the Hardware SPI port in ESP32 module( ESP-WROOM-32) for Micropython code?

For example.
1) SPI(1)

Thanks in advanced.

Site Admin
Posts: 539
Joined: Mon Dec 09, 2013 5:02 pm

Re: What are ESP32 SPI Ports for Micropython SPI(1)?

Postby Damien » Tue May 23, 2017 12:14 pm

The default SPI ports are defined by the ESP32 module itself (and actually the ESP IDF is doing all the low-level work here to configure the pins). If you don't provide sck/mosi/miso pins for a peripheral then the "most recent" pins are used, which is usually going to be the default pins for that peripheral.

According to the ESP IDF, the default pins for SPI(1) are: sck=Pin(6), mosi=Pin(8), miso=Pin(7). For SPI(2) it's: sck=Pin(14), mosi=Pin(13), miso=Pin(12). In MicroPython the CS pin must be handled by user code, it's not controlled by the hardware peripheral.

Who is online

Users browsing this forum: loboris and 4 guests