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!