Spark Logic

ws2812b… again… Sorry… on F4

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?

Replies20

Sun Mar 25, 2018 9:06 am

You are not allowed to mix the cores.
Either use Roger’s one, or stick to generic as detected from your log:
Arduino\hardware\STM32GENERIC\STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog \libraries\SPI\src/SPI.h

Sun Mar 25, 2018 10:35 am

Oh….

In that case what else would I need to do to get the library to run?

Sun Mar 25, 2018 11:00 am

And to add, just tested, It also doesnt compile on rogers F4 core. Only the f1 cores.

Sun Mar 25, 2018 12:53 pm

If you would post the error codes we might be able to help.

Alternatively, you could give it a try with my repo, is further developed than Roger’s core regarding F4 stuff.

Sun Mar 25, 2018 1:15 pm

I commented out wireing private, as it was included but was an empty file….

installed your core

https://pastebin.com/dLARf02H

my guess is something to do with the way it calls dma transfer. i honestly dont know… My brain is turning into mush

Sun Mar 25, 2018 1:24 pm

I see, there is a missing DMA related function in the SPI lib for F4.
It needs to be implemented, which takes time, a missing ingredient.

Sun Mar 25, 2018 4:24 pm

Im assuming just copying the f1 SPI library wont work?

Sun Mar 25, 2018 4:47 pm

It won’t work, the DMA of F4 is different from F1.

Sun Mar 25, 2018 5:09 pm

[stevestrong – Sun Mar 25, 2018 9:06 am] –
You are not allowed to mix the cores.
…

Words of pure wisdom. … in addition to not mixing the cores, one also should not cross-the-streams.

Egon: Don’t cross the streams.
Peter: Why?
Egon: It would be bad.
Peter: I’m fuzzy on the whole good/bad thing. What do you mean “bad”?
Egon: Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.
Raymond: Total protonic reversal.
Peter: That’s bad. Okay. Alright, important safety tip, thanks Egon.

Image

Sun Mar 25, 2018 6:47 pm

That would be bad :p

Mon Mar 26, 2018 6:31 pm

So do you feel this library would work, if the SPI library was updated to include all the functions?

Mon Mar 26, 2018 6:56 pm

[Nutsy – Mon Mar 26, 2018 6:31 pm] –
So do you feel this library would work, if the SPI library was updated to include all the functions?

Is that not what Steve implied here?

Frédéric (and team) have done a good job with the NucleoNucleoDevelopment and computing boards…o have this dev board for BlueNRG at a pretty hefty price tag though, hopefully the ‘ nucleo ’ & common dev board versions would be out soon Laughing … 007v1.html oops/oh found an…View in hardware catalog F4 boards
STM32F4STM32F4Microcontrollers and processors…uild.board' preference. Auto-set to: STM32F3_DISCOVERY_F3 Board Arduino_STM32-master: STM32F4 :discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCO…View in hardware catalog

and the wrappers for CubeMX + HAL.

The F4 support in libmaple has been somewhat weak from the start; Steve has made remarkable inroads with advancing the code, but I understand priorities and time constraints – which is why I simply shy away from backend core work … difficult to please the crowds.

IMO, the longterm solution to STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog & ArduinoIDE is the https://github.com/stm32duino/Arduino_Core_STM32 … it is Official, it is supported, it utilizes current STM thinking on tools, and migrating to pro-tools is straightforward.

Ray

Mon Mar 26, 2018 10:12 pm

[Nutsy – Mon Mar 26, 2018 6:31 pm] –
So do you feel this library would work, if the SPI library was updated to include all the functions?

Yes, it is the function dmaSendAsync(), which was implemented by Victor for F1.
It is not yet ported to F4.

Sat Apr 07, 2018 8:20 am

I have ported the dmaSendAsync() function to my F4 repo, you may give it a try.

Sun Apr 08, 2018 11:00 pm

I havnt got my main dev computer running…

But i just tried to compile the strand test, copying the library over from the f1 lib directory… and commenting out the wire private include.

Sadly still didnt compile…

https://pastebin.com/Ey5Hf2rs << the error

Mon Apr 09, 2018 8:13 am

You should get my repo, it was updated 2 days ago with the changes related to “__IO”

Mon Apr 09, 2018 10:14 am

I really thought I did… :/

Will try again now.

Mon Apr 09, 2018 11:31 am

I have corrected the errors occurred during conflict merging the __IO stuff.
It should compile now error free.

Mon Apr 09, 2018 1:04 pm

Excellent… I cant do an in depth test with regards to the neo pixels… but it does indeed compile. When i get my main rig back up and running (waiting for PSU) i can do a propper test :D

Thanks Steve, this is a great help :)

Post a reply

Optional · up to 10 MiB