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

    Stamp C3 / C3U SPI

    Scheduled Pinned Locked Moved Cores
    3 Posts 3 Posters 5.6k Views
    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 Offline
      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 Offline
        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 Offline
          macsbug
          last edited by macsbug

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

          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
          • First post
            Last post