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
fix led strip for h7 #12890
fix led strip for h7 #12890
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic needs update here also:
If we add USE_LEDSTRIP_CACHE_MGMT for H7 unconditional this code needs to be revised as the condition on line 62 will be unreachable.
betaflight/src/main/drivers/light_ws2811strip.c
Lines 50 to 67 in 70b9c7f
#ifdef USE_LEDSTRIP_CACHE_MGMT | |
// WS2811_DMA_BUFFER_SIZE is multiples of uint32_t | |
// Number of bytes required for buffer | |
#define WS2811_DMA_BUF_BYTES (WS2811_DMA_BUFFER_SIZE * sizeof(uint32_t)) | |
// Number of bytes required to cache align buffer | |
#define WS2811_DMA_BUF_CACHE_ALIGN_BYTES ((WS2811_DMA_BUF_BYTES + 0x20) & ~0x1f) | |
// Size of array to create a cache aligned buffer | |
#define WS2811_DMA_BUF_CACHE_ALIGN_LENGTH (WS2811_DMA_BUF_CACHE_ALIGN_BYTES / sizeof(uint32_t)) | |
DMA_RW_AXI __attribute__((aligned(32))) uint32_t ledStripDMABuffer[WS2811_DMA_BUF_CACHE_ALIGN_LENGTH]; | |
#else | |
#if defined(STM32F7) | |
FAST_DATA_ZERO_INIT uint32_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE]; | |
#elif defined(STM32H7) | |
DMA_RAM uint32_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE]; | |
#else | |
uint32_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE]; | |
#endif | |
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot.
Tested on MATEKH743 with 24 LEDs. |
What do you mean? |
You could check the change - or leave a note / TODO for later |
I will test it later and/or leave a Todo. Good find 👍 |
AUTOMERGE: (FAIL)
|
G'day, no idea if I'm using GitHub correctly but @ctzsnooze reccomended I go here so here I am! Just loaded this commit to try get LEDs going on my Foxeer H743 & still having some troubles, but its working much more then it was before (before was totally random, now there some consistency). If I set the colour red, I get no LED colour. If I set green, I get a pulse of random colours, a pulse of green & then nothing. If I set Green with larson scanner I get an RGB smooth colour changing effect! It's not optimal but its consistent at least. Also thanks so much for working on this swiftly!! Need LEDs for MultiGP IO, so really really appreciate the work!! |
I’ll run a bunch of combos tonight. |
Which configurator version are you using? Also, how many LEDs are installed? Maybe too much for just USB power? Try with a lipo as well please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test on 2 setups using foxeer h7 mini.. they work as they should if you have the right configurator.. is there any reason not to resolve the contention and merge this
Has this been resolved? Or does it meed another PR ? |
Hey Guys!! Just tried Nightly build and its working perfectly now!! Thank you so much for getting this together on such short notice!! Going to finish configuring the rest of the fleet now! Cheers!! |
Thanks @freasy !! |
* fix led strip for h7 * account for cloud build custom defines * remove unused code
* fix led strip for h7 * account for cloud build custom defines * remove unused code
This fixes LED STRIP function for H7