Spark Logic

ws2812b… again… Sorry… on F4

Nutsy Sat Mar 24, 2018 11:45 pm

So with my project I need to use addressable leds again…

However rogers library hes bundled with the stm32core isnt compiling with the f4vet6 genric core.

https://pastebin.com/6UmWGUJJ the compile command line….

Im already using SPI1 so i changed the hardware spi call to SPI2, didnt work…

i had assumed the spi calls are identical between the two cores. Am i missing something?

Replies

Nutsy Wed May 30, 2018 12:37 pm

Hi again sorry for the massive delay, the PSU took a whole month to turn up and by that time i started working on a different project that took up much of my time…

Im now back on this one. But having a little problem getting this working still….

I dont think its a core issue its just me trying to edit things and thats not working…

The normal library uses SPI 1 hardware… But i want to use the SPI2 pins…

ive tried editing the SPI calls in the library to SPI2 or SPI_2 but i get undeclared errors…

What am i missing? (apart from a brain obviously)

stevestrong Wed May 30, 2018 2:06 pm

I don’t know what you are missing, but I am missing more information in order to help, for instance the error message, the used sketch, OS, upload method, …

Nutsy Wed May 30, 2018 3:28 pm

Hi sorry… Umm well i sort of got round that error but it didnt start the leds up…

I added SPIClass SPI_2(2); to the library header after reading it on some other threads on how to activate the second spi…

While this did compile, the leds still didnt run in the strand test.

…. added
i reverted back to spi1 (SPI.) but still didnt work…

stevestrong Wed May 30, 2018 6:20 pm

Check the connections again and try a simple SPI write at the beginning.
If it works then add some more code.

stevestrong Fri Jun 01, 2018 1:21 pm

Actually, it is not necessary to define a new separate instance for SPI_2, it is enough to call
SPI.setModule(2);

Sign in to reply