Skip to content

APA102 don´t work with LAN8720 (WT32-ETH01) #2542

Closed

Description

@AVRnet

What happened?

With actual build 2112080 i have a problem to bring WT32-ETH01 LAN Interface work together with APA102 LEDs.

To Reproduce Bug

Configured LAN Interface (W32-ETH01) and selection of APA102 with save, the Modul run into bootloop and AccessPoint go up.

Expected Behavior

LAN Interface is configured and works amazing with WS281x and SK6812 LEDs.

Install Method

Binary from WLED.me

What version of WLED?

2112080

Which microcontroller/board are you seeing the problem on?

ESP8266, ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. blazoncek commented on Feb 12, 2022

    @blazoncek
    Contributor

    Use GPIO pins that do not conflict.

  2. AVRnet commented on Feb 15, 2022

    @AVRnet
    Author

    I have tested all kinds of GPIO combinations.
    Only WLAN works flawless with APA102 Chips.
    I couldn´t have done with W32-ETH01 and APA102 to use the LAN port.

    Setup with WS281x and SK6812 LEDs works however perfect.

  3. blazoncek commented on Feb 25, 2022

    @blazoncek
    Contributor

    Try lowering SPI speed by changing DotStarSpiHzMethod; in bus_wrapper.h

  4. drlechk commented on Mar 21, 2022

    @drlechk

    I'm having the same issue. lowering SPI speed does not help. Did you solve the problem?

  5. AVRnet commented on Mar 22, 2022

    @AVRnet
    Author

    I'm afraid not. I haven´t got any idea to solve the problem.

  6. lucasheld commented on May 16, 2022

    @lucasheld

    I also have the same problem.
    I am using WS2801 LED strips with an ESP32 dev board and a LAN8720 module. The GPIO pins were connected as on a WT32-EHT01, so WLED works without adjustment with the provided binary.
    All LED strips that require only one pin can be selected without any problems. As soon as a LED strip is selected that needs clock and data pins, Ethernet does not work anymore and the access point is started. Only after selecting another LED strip Ethernet works again.
    No possible GPOI combination works. Also reducing the SPI speed does not change anything.
    To reproduce the behavior the LED strip does not have to be present and connected, the selection in the web interface is sufficient.

  7. blazoncek commented on May 16, 2022

    @blazoncek
    Contributor

    SPI is used exclusively for driving APA102 (or other SPI) LEDs.
    No other SPI device can currently coexist with SPI LEDs.

  8. lucasheld commented on May 17, 2022

    @lucasheld

    As far as I know, the LAN8720 module does not use SPI at all, but RMII. Accordingly SPI should be available for the LEDs right?

  9. d3473r commented on Jun 29, 2022

    @d3473r

    I bought a WT32-EHT01 to run a WS2801 strip and I'm now facing the same issue, ethernet not working as soon as WS2801 is selected in WLED.

    The datasheet mentions RMII not SPI as @lucasheld mentioned.
    Maybe someone who speakes chinese can help with the datasheet?
    WT32-ETH01规格书V1.2.pdf

  10. lucasheld commented on Jun 30, 2022

    @lucasheld

    @d3473r
    The datasheet is also available in english.
    WT32-ETH01_datasheet_V1.1- en.pdf

  11. ywwg commented on Aug 22, 2022

    @ywwg

    image

  12. ywwg commented on Sep 17, 2022

    @ywwg

    Can confirm, as soon as I set LED type to APA102 ethernet stops working. Also I am using software SPI, because I can change the GPIO pins at will

  13. BlackBird77 commented on Sep 30, 2022

    @BlackBird77

    Hi All..

    i can confirm it too but on the Olimex POE Boards..

    If you use SPI LEDs and Ethernet it is not working..

    Here are the modes:
    DotStarMethod: OK but Software only
    DotStarEsp32DmaVspiMethod: OK but to fast
    DotStarEsp32DmaVspi1MhzMethod: OK perfect
    DotStarSpiMethod: NotOK should work, but it did not...
    DotStarVspiMethod: NotOK should work, but it did not...
    DotStarEsp32DmaHspiMethod: NotOK because it conflicts with ethernet port
    DotStarHspiMethod: NotOK because it conflicts with ethernet port

    Happy lights
    André

  14. blazoncek commented on Sep 30, 2022

    @blazoncek
    Contributor

    WLED uses HSPI for driving LEDs as VSPI may be used by other devices.

  15. 17 remaining items

  16. benkuper commented on Mar 11, 2023

    @benkuper

    Ok thanks, sorry if I was not clear by saying that searching led me to nothing, and as a developer for software that people keeping asking "dumb" questions about, I know how this will feel but still :
    Would it be possible to give a bit more information, like file to modify and some lines of code ? Or a link to whoever would have already done that.

    Looking for SPI, DMA in the code didn't lead as well to interesting or understandable enough content for me to be comfortable modifying, didn't find anything online of people successfully doing that.. is it on the arduino/pio side, or wled specific code, is it a compile option or some deeper things to comment, uncomment... ?

    Thank you very much

  17. BlackBird77 commented on Mar 11, 2023

    @BlackBird77

    Replace bus_wrapper.h lines

    //APA102
    #define B_HS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarSpi5MhzMethod> //hardware SPI
    #define B_SS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarMethod>    //soft SPI

    with

    //APA102
    #define B_HS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarEsp32DmaVspi5MhzMethod> //hardware SPI with DMA
    #define B_SS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarMethod>    //soft SPI

    This change forces the NeoPixel library to NOT use the Arduino SPI implementation. I don't know why this makes a difference. I searched also all the code. And compared the difference in ARDUINO and ESP32 DMA SPI implementation. All i found was, Arduino do not initialize the QUAD SPI pins.. The DMA SPI Driver explicitly disables the QUAD SPI pins.. And i found the default QUAD SPI PINS are on ports where the Ethernet chip is connected.

    I hope this helps.

    Andre

  18. blazoncek commented on Mar 11, 2023

    @blazoncek
    Contributor

    Aha!
    WLED is coded to use HSPI peripheral, not VSPI. Please check if other places are broken (usermods) when using VSPI for LEDs.

    Thank you.

  19. blazoncek commented on Mar 11, 2023

    @blazoncek
    Contributor

    Will add this to main when I have time to test it a bit:

    #ifdef WLED_USE_ETHERNET
    #define B_HS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarEsp32DmaHspi5MhzMethod> //hardware HSPI with DMA
    #else
    #define B_HS_DOT_3 NeoPixelBrightnessBus<DotStarBgrFeature, DotStarSpi5MhzMethod> //hardware HSPI
    #endif
  20. added a commit that references this issue on Mar 12, 2023
  21. blazoncek commented on Mar 12, 2023

    @blazoncek
    Contributor

    Please test recent commit. It works on my test system with @conradopoole Ethernet shield and @srg74 universal shield/controller.

  22. benkuper commented on Mar 12, 2023

    @benkuper

    Tested and working on Olimex ESP32-POE-ISO, connecting SK9822 (APA102 clones) to pins 32 & 33 (same as ethernet), and using SD card MMC at the same time !

    Thank you all very much !

  23. AVRnet commented on Mar 12, 2023

    @AVRnet
    Author

    Confirm that everything is fine now,
    tested and working on WT32-ETH01 with 300 pieces of APA102 to DATA GPIO2 and CLOCK GPIO4.
    (WLED v0.14.0-b2)

    Thanks to all !!!

  24. blazoncek commented on Mar 12, 2023

    @blazoncek
    Contributor

    Please close rhen.

  25. added a commit that references this issue on Mar 12, 2023
  26. added a commit that references this issue on Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions