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

    Core2: WS2812 and interrupter

    Core 2
    1
    1
    3.5k
    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
      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
      • First post
        Last post