BARTH STG with STM32F091xC

Post here first, or if you can't find a relevant section!
Posts: 25
Joined: Wed Apr 29, 2020 9:07 pm

Re: BARTH STG with STM32F091xC

Post by ozcar »

There are a lot of pixel LED libraries out there, but as you can see from the thread that Ray pointed you to, they might require some degree of tinkering to get them to work.

Of the two libraries mentioned in that thread, I think Roger's WS2818B library would be best for a small number of LEDs, but it it looks like it would require some changes to get it to work with the STM core. It does require a SPI-capable pin, which might be a problem for you.

The Adafruit Neopixel library uses bit-banging (at least, on STM32 it does), which means it can work on any pin, but one downside is that it disables interrupts and does horrible things to Systick while it is spitting out the LED data, which might cause some trouble to whatever else you have going on.

Either way, you might run into some issues depending on what frequency the clocks on your module run. I took a quick look at the BARTH core, and it appears they set it assuming 8MHz HSE without using PLL, so end up with F_CPU 8MHz (not 100% sure about that, because the STG-800 document I turned up mentions a 16MHz oscillator). Presumably you could change the clock config to run it faster, but I don't know what implications that might have.

Post Reply

Return to “General discussion”