BARTH STG with STM32F091xC

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

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.
User avatar
thebeadster
Posts: 6
Joined: Wed Jun 24, 2020 1:05 pm
Location: Manchester
Contact:

Re: BARTH STG with STM32F091xC

Post by thebeadster »

Thanks ozcar,
work has got in the way of this little project.
Eventually I want to get the CAN working because that's what makes this little thing great for cars.

I am still on a learning curve with the STM32 so I will probably try Adafruits neopixel, the other functions on this job are really simple , only when the CAN is involved it may be a problem.

thansk agin for looking at it, much appreciated.

mike
Post Reply

Return to “General discussion”