Stamp C3 / C3U SPI
-
First of all I really really like the Stamp C3(U), I find the plastic cover totally great. But what frustrates me (maybe I'm doing something wrong) is that SPI is not usable.
The reason is that for classic full-duplex SPI on a ESP32C3 you need SPI2 (Fast SPI) which leads to the following:
- MOSI = FSPID = GPIO7 --> nicely on the PIN header
- MISO = FSPIQ = GPIO2 --> the status LED on Stamp C3(U), not on the header
- CLK = FSPICLK = GPIO6 --> nicely on the PIN header
- CS = FSPICS0~5 = GPIO10 for CS0 --> nicely on the PIN header and in general chip select is a bit easier
I really don't get why GPIO2 was used for the status LED, from what I get there's nothing special about it. So I think / strongly believe / am convinced that SPI peripherals just don't work on the stamp...
-
Hello @dominik
the nice thing about ESP32 and its variants (like the C3) is that different functions (like SPI) can use almost any GPIOs.
With the Arduino environment you can define the GPIOs to be used for SPI like this:
#define SCK GPIO_NUM_6 #define MISO GPIO_NUM_4 #define MOSI GPIO_NUM_7 #define CS GPIO_NUM_5 SPI.begin(SCK, MISO, MOSI, -1);Thanks
Felix -
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login