-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APA102 don´t work with LAN8720 (WT32-ETH01) #2542
Comments
Use GPIO pins that do not conflict. |
I have tested all kinds of GPIO combinations. Setup with WS281x and SK6812 LEDs works however perfect. |
Try lowering SPI speed by changing DotStarSpiHzMethod; in bus_wrapper.h |
I'm having the same issue. lowering SPI speed does not help. Did you solve the problem? |
I'm afraid not. I haven´t got any idea to solve the problem. |
I also have the same problem. |
SPI is used exclusively for driving APA102 (or other SPI) LEDs. |
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? |
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. |
@d3473r |
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 |
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: Happy lights |
WLED uses HSPI for driving LEDs as VSPI may be used by other devices. |
On the Olimex Board is the ethernet controller on Hspi and the SD Card on Vspi.. If you don't use a external SD card you can drive the Leds on Vspi.. And if i read the code right, the Arduino default is also Vspi, but it initializes only some spi IO pins and not the QuadHD, QuadWP Pins of Vspi. The Esp32 DMA SPI mode initializes all Vspi pins and deactivate the unused pins.. |
Another idea - possibly related to flash speed? board_build.f_flash = 80000000L
board_build.flash_mode = qio It could also be the other way around: in case you already use firmware for 80Mhz, then maybe the flash on the WT32-ETH01 does not run reliably at 80mhz, and building for 40Mhz might help. |
The WT32-ETH01 use a chip WT32-S1 where in the datasheet, I found this: On-board clock 40 MHz crystal. |
I tried with this compile option but same issue. Working fine at configuration time but not after the reboot.
|
Today I compiled again with the main branch (71d84fe) with same configuration but I erase completely the flash + esp32_bootloader_v4.bin. |
Could be a hardware conflict between APA102 and LAN driver, for example:
It could explain your observation that it's not working after reboot, if LED drivers are initialized before the LAN driver, so they can "steal" hardware ressources and the LAN driver is not able any more to initialize. |
I tried reversing clk io2 / data io4 --> Nok as well. APA102 code do something (HSPI related) that LAN don't like but I would not go into the direction of GPIO allocation issue because it's used by LAN :) |
I'm running a QuinLED-ESP32 ethernet board and experiencing the same (guess I'm not sure if the chip that uses is LAN8720 or not) with APA102 strips breaking ethernet communication. |
I think it has something to do with the SPI initialization over the Arduino
framework! This is the standard implementation in WLED for SPI!
If you compile it with the SPI DMA driver it works on the same Pins..
I have looked for differences in the SPI initialization and code
generally..
The only difference I can see is, the Arduino implementation do not
deactivate the SPI Quad Pins..
The Esp32 SPI DMA does a explizit deactivation of the SPI Quad pins..
On my Olimex Board the IOMUX SPI Quad Pins are on the same pins with the
LAN Chip!
Greetings!
Andre
Nick Walke ***@***.***> schrieb am Fr., 11. Nov. 2022, 18:39:
… I'm running a QuinLED-ESP32 ethernet board and experiencing the same
(guess I'm not sure if the chip that uses is LAN8720 or not) with APA102
strips breaking ethernet communication.
—
Reply to this email directly, view it on GitHub
<#2542 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHDQYFWOBDYQIXY5QBJGN4DWH2AG3ANCNFSM5OGXZ6IQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Same problem here, did anybody find a solution ? |
Yes compile it yourself and use the DMA Drivers for SPI..
This works perfectly!
Greetings
Ben Kuper ***@***.***> schrieb am Sa., 11. März 2023, 13:37:
… Same problem here, did anybody find a solution ?
—
Reply to this email directly, view it on GitHub
<#2542 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHDQYFTBFBSI6DEZ4BWOJN3W3RW2JANCNFSM5OGXZ6IQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@BlackBird77 why don't you make a PR for your findings? |
DMA Driver for SPI, looked in few places and didn't find any clear way of doing it for WLED... any pointers on where to look ? |
It is only configuration..
Nothing complicated.
You have to disable the standard SPI driver and use the DMA SPI driver.
But this is only a workaround, not a fix for the real problem, of the
original SPI driver.
Blaž Kristan ***@***.***> schrieb am Sa., 11. März 2023,
15:09:
… @BlackBird77 <https://github.com/BlackBird77> why don't you make a PR for
your findings?
Please.
—
Reply to this email directly, view it on GitHub
<#2542 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHDQYFSSO7V6GBVCFI3XQB3W3SBRDANCNFSM5OGXZ6IQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Not everyone knows everything. Please. |
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 : 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 |
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 |
Aha! Thank you. |
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 |
Please test recent commit. It works on my test system with @conradopoole Ethernet shield and @srg74 universal shield/controller. |
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 ! |
Confirm that everything is fine now, Thanks to all !!! |
Please close rhen. |
* added klipper usermod * enabled IP Change and updated the Readme * Added spreading from center and fixed the enable * fixing the PR conflict * bugfixes * xml.cpp: correct type for checkbox global led buffer" (was not shown correctly) * fx.cpp: 2D floating blobs - correct swapped x/y coordinates (did not render correctly on non-square matrix) * update build nr and npm run build * Delete wled00.ino.cpp accident * Whitespace. * Art-Net transmit support for network LEDs Like DDP, this allows WLED to address network systems using the Art-Net protocol. Universe starts at zero, because that's the first universe in Art-Net. Works with RGB. It's coded to also work with RGBW, but I couldn't find a great place to enable it without mucking with things I don't understand. * whitespace cleanup * PROGMEM for header * Fix for Aircoookie#2542. UI rebuild. * workaround for issue Aircoookie#3128 * adding wled00.ino.cpp to gitignore to avoid future accidents in GH Desktop * Fix typing to resolve build errors after installing the mpu6050_imu usermod. * adding WLED_DISABLE_ADALIGHT (issue Aircoookie#3128 This flag disables reading commands from serial interface (RX = gpio 3) Add -D WLED_DISABLE_ADALIGHT to your custom pio build environment. * typo * comment updated Also "Serial JSON" is not possible when reading from RX pin is disabled. --------- Co-authored-by: lost-hope <s.willrodt@yahoo.de> Co-authored-by: Frank <frank.moehle@outlook.de> Co-authored-by: Frank <91616163+softhack007@users.noreply.github.com> Co-authored-by: Blaz Kristan <blaz@kristan-sp.si> Co-authored-by: TroyHacks <5659019+troyhacks@users.noreply.github.com> Co-authored-by: Ryan Horricks <ryan.horricks@gmail.com>
and the corresponding fix Aircoookie@d1fed11
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
The text was updated successfully, but these errors were encountered: