SPI pullups, INT pin question
Posted: Fri Nov 17, 2017 3:54 pm
Hi everyone...
Im designing a custom PCB using the ESP32-WROOM-32.
I did some searching but couldnt find the answer I was looking for regarding the IO-MUX. I read the datasheet and the IO-MUX wasnt 100% clear on a couple things.
This will be using the ESP32 interfaced to an MCP2515 CAN transceiver using SPI. My project needs two CAN busses, so Ill be using the ESP32's internal CAN controller for CAN-1, and using an MCP2515 for CAN-2.
Here is how I have pins mapped on my PCB design:
MCP-2515.........ESP32
MISO..............IO 12
MOSI..............IO 13
SCK................IO 14
INT................IO 15
CS.................IO 27
The MISO, MOSI, SCK pins Im pretty sure are correct, as they look to be the appropriate hardware SPI pins.
The Chip-Select pin, from what I have read, can be re-assigned to any GPIO (default is GPIO 15, but this doesnt work for my PCB design, so Ill need to use GPIO 27)
The SPI interrupt pin, will that work on any GPIO? Ill be using GPIO 15. I wasnt sure if using hardware SPI required the INT to be a certain pin.
My final question.....are any pullup resistors needed on the SPI pins? Some people say its a good idea to have a pullup on the CS pin, but I have used the MCP2515 with Arduino 8-bit AVR's and it worked fine with no pullups. I wasnt sure if the ESP32 was different.
Something like this:
The MCP2515 runs at a maximum of 10 MHz SPI....im sure the ESP32 can make full use of that?
Thanks
Im designing a custom PCB using the ESP32-WROOM-32.
I did some searching but couldnt find the answer I was looking for regarding the IO-MUX. I read the datasheet and the IO-MUX wasnt 100% clear on a couple things.
This will be using the ESP32 interfaced to an MCP2515 CAN transceiver using SPI. My project needs two CAN busses, so Ill be using the ESP32's internal CAN controller for CAN-1, and using an MCP2515 for CAN-2.
Here is how I have pins mapped on my PCB design:
MCP-2515.........ESP32
MISO..............IO 12
MOSI..............IO 13
SCK................IO 14
INT................IO 15
CS.................IO 27
The MISO, MOSI, SCK pins Im pretty sure are correct, as they look to be the appropriate hardware SPI pins.
The Chip-Select pin, from what I have read, can be re-assigned to any GPIO (default is GPIO 15, but this doesnt work for my PCB design, so Ill need to use GPIO 27)
The SPI interrupt pin, will that work on any GPIO? Ill be using GPIO 15. I wasnt sure if using hardware SPI required the INT to be a certain pin.
My final question.....are any pullup resistors needed on the SPI pins? Some people say its a good idea to have a pullup on the CS pin, but I have used the MCP2515 with Arduino 8-bit AVR's and it worked fine with no pullups. I wasnt sure if the ESP32 was different.
Something like this:
Code: Select all
SPI.begin(14, 12, 13, 27); // sck, miso, mosi, ss (ss can be any GPIO)
pinMode(27, OUTPUT);
digitalWrite(27, HIGH);
Thanks