0

huzzah32 io12 / SPI question
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

huzzah32 io12 / SPI question

by ubiubu on Thu Jan 10, 2019 5:45 pm

hi

a question about the huzzah32, if anyone had any insights:

the FAQ says: "IO12 - this pin has an internal pulldown, and is used for booting up. We recommend not using it or if you do use it, as an output only so that nothing interferes with the pulldown when the board resets"

what's confusing me is that (if i see it right) IO12 is routinely advertised as the ESP32 "native" MISO signal ("HSPI" port), so is it save to use IO12 for SPI purposes, or not?

thanks!

ubiubu
 
Posts: 8
Joined: Thu Jun 21, 2012 6:56 am

Re: huzzah32 io12 / SPI question

by adafruit_support_mike on Sat Jan 12, 2019 2:04 am

The ESP32 has two ways of routing peripheral signals to the physical pins.

The first one, the GPIO Matrix, can map any signal to any physical pin. There are about 240 possible IO signals, including four separate SPI peripherals.

The second one, the IO_MUX, bypasses the GPIO Matrix and makes connections between specific peripherals and specific pins. Those connections are faster than the GPIO Matrix, and are used by things like the SD card interface and the high-speed SPI peripheral.

GPIO12 is the IO_MUX connection for the HSPI peripheral's MISO signal. You could call it a 'native' connection, but it's more like a special case. The pin defaults to input with a pulldown when the ESP32 reboots, and the ESP32 checks the state of that pin during the boot process to decide how it should operate.

You can use the pin for SPI, but you have to be aware of the pulldown resistor and boot-time signal requirements. It's your job to make sure there are no conflicts that will cause problems.

adafruit_support_mike
 
Posts: 57354
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.