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

    Core2: WS2812 and interrupter

    Scheduled Pinned Locked Moved Core 2
    1 Posts 1 Posters 4.1k 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.
    • S Offline
      sheepDog
      last edited by sheepDog

      Hello,

      I use a lot of own libraries to control my home. Last library was a small extension of Adafruit_NeoPixel to show some status information.

      I tested with four libraries (M5Core2.h, Wifi.h, Adafruit_NeoPixel.h and my lib) with a small test program with Arduino IDE and it worked fine. I used 16*16 led ws2812.

      Then a changed back to my ESP-IDF and use the some libraries and some more stuff. If I started to switch some less on my WS2812 in green color, it worked 4 or 5 times without problems. At the next one switching event I got a problem on the second half of the leds:

      • Some switch the color from green to blue

      • Some led switch incorrect on

      The first 100 to 120 leds all always correct. I think it is a interrupt problem, but in then Adafruit_NeoPixel.h interrupts stopped. I double-checked if this part worked:

        // NRF52 may use PWM + DMA (if available), may not need to disable interrupt
      #if !( defined(NRF52) || defined(NRF52_SERIES) )
        noInterrupts(); // Need 100% focus on instruction timing
      #endif
      

      I also stop interrupts im my library for the critical part, but it didn't work. My unfounded suspicion is a unstoppable interrupt in M5Core2.h or similar.

      Do anyone have an idea?

      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