🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Stamp C3 / C3U SPI

    Cores
    3
    3
    4.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dominik
      last edited by

      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...

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        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

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • M
          macsbug
          last edited by macsbug

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post