Closed jungnitz closed 3 years ago
I have found the issue. HAL_DMA_DeInit resets all values in the DMA_HandleTypeDef passed to it. Therefore no values and callbacks are stored (and the interrupt flags are not set in HAL_DMA_Init). Commenting these lines fixed it. I'd suggest doing so in the code provided here aswell if there is no real purpose for these.
@nklz I noticed the transferComplete flag wasn't being reset as well. Thanks for noticing this, I've been struggling with this for a while now. I'm commenting here so hopefully martin sees this and gets rid of those lines for others who want to use the library.
Hi, thanks for info. Can you test this PR #8 ? More details in the PR. Can someone with hardware and correct compiler/IDE test it? Thanks
So it motivated me enough to build some hardware with Discovery kit and LED strip. I've updated the HAL from Github and the #8 fixed it.
I've tested PR #8 and it works correctly.
Thanks for confirmation.
I have a fairly simple setup with 6 parallel outputs. However I have ran into problems with LEDs either not showing up or flickering or similar things. First thing I tried was hooking up an logic analyzer to one of the data pins, which shows data sent with correct timing, but seemingly the same 16 bits repeatedly and no reset signal. Further investigation showed that
ws2812b.transferComplete
is never reset after beginning transmission. Since that is done in the DMA callbacks, I decided to set breakpoints in the IRQ and the HAL handlers and noticed that while the IRQ is called, the HAL handlers are never called. I didn't really go into detail about how this library really works and therefore do not know whether its relevant or not, but the Timer callbacks and the Timer IRQ are never called aswell. I would appreciate help getting this to work.