Weird performance for SPI comunication
Hello everyone
I am facing a weird problem with bluepill (stm32f103c8). I developed a code to control lead addressable stripe that uses SPI communication (APA102), and it worked nicely, then I tried to PWM on timer 2 beside SPI, and this made led stripe to make totally weird performance, like lighting a different led than the one I choose, ignoring other leds, etc...
the more strange thing, is that I created a new project and tested the original SPI code that worked nicely before I add PWM, and strangley same weird results!
I uninstalled STM32Cube, and installed it again, nothing changed.
I decided to start over and follow some tutorial over internet, and I followed this one here:
https://www.youtube.com/watch?v=XcDL2afLpNY
but it uses keil and not using HAL while using SPI transmit commands, so I modified his code a little bit ()my modified code is in attachements, so I can send using HAL, and I got a similar weird performance one more time. I changed everything, wiring, microcontroller, uninstalled the IDE and installed it again and nothing worked.
What could be missing? any suggesstions?