Spark Logic

Nucleo-L476RG Audio Library support

STM32F103C8T6 Example · LQFP48 Pinout

Hi all

I came 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 arduino after making a midi controller that combines multiple LFO’s to confuse the heck out of various software synths and works well, but I found when running 96 individual LFO’s it makes the Arduino MegaArduino MegaDevelopment and computing boards…:57 pm Roger, In order to use the Maple mini in my project (porting it directly from Arduino Mega ), I would need the I2C library to support both master and slave mode. This solut…View in hardware catalog chug a little to say the least. I plan to move my project to the 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 and it feels fairly straight forward, albeit with some minor changes to account for the 3.3v limits to the system as well as some changes to the physical interface, using touch control instead of buttons. Anyway, I wondered how much fun it would be to intergrate some hardware voices, and have ended up flying down another rabbit hole, playing with the Mozzi library on an Uno as well as buying a few blue pills (and then realising they were coming from china, so have about 6 more weeks till they arrive) with plans to try mozzi on those..and then I discovered the TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog and it’s excellent audio library.

Anyway, I’m rambling – I just wanted to give you a bit of background – what I need to ask is, while I wait for those blue pills I’ve got time to waste and wondered, is there any way to add support for either Mozzi or the TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog audio library, or is there some other capable audio library out there that will run on 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 board with the stm core that also utilises the DAC?

Of course if there’s another core that will give me what need, happy to use that instead.

Replies14

Mon Oct 01, 2018 10:22 pm

Audio (I2s, Mozzi, …) isn’t really implemented in the official core out of the box (but this might be changed in the future – I hope so).
  • ChrisMicro played a lot with audio and the “genericCore” on F4, use the search function.
  • I did a I2S DMA circular buffer (adaption code) on the F4 which *should* running on the official core, please see here viewtopic.php?f=18&t=4095 and read this: viewtopic.php?f=48&t=4109
  • For serial MIDI take this: https://github.com/FortySevenEffects/ar … di_library (this awesome library runs on nearly every *duino platform I tried out). But for “MIDI only” I wont use a F4 but a Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog (even this device will fads itself with MIDI and counting IDLE circles)
  • USB-Midi: Not implemented in any way (both: generic or official) – maybe arpuss will convert his USB-HID library from the F1 Roger core to *HAL.
  • Mozzi: There was an attempt by tfred some months ago (but also F1 Roger core): viewtopic.php?f=15&t=2936 – As I remember, the Mozzi library is a masterpiece, but needs timer (and low level code?) and so on, so I’m pretty sure it won’t compile out of the box.

Please keep in mind, that for the generic core there no real support or updates anymore (At least not in the last six months).

Mon Oct 01, 2018 10:27 pm

But to be honest: At the moment(!) for Audio/MIDI any F103 and Rogers Core is the best choice for playing around. There are many examples in this forum and you can use USB-MIDI (so the board is recognized as a standard MIDI USB device). Keep in mind, that with the “better” F1 MCU’s (STM32F103RET and up) you have also build in DAC’s (12bit) and two independent I2S interfaces (I2S Audio DAC’s are available much under 1 Euro, so for 10PCS about 2-5 EURO) But for further projects I’ll move to the F4 (+++MHZ + floating point!) and the official core. For USB MIDI I’ll use a simple bluepill “daughter board” until there is no USB MIDI available (and I believe it won’t be in near future – USB MIDI is only for interest for a few “freaks” ;) )

Tue Oct 02, 2018 4:23 am

ChrisMicro played a lot with audio and the “genericCore” on F4, use the search function.

Hi Mathias,
thanx for mentioning that.
I also played with Rogers Core:
https://github.com/ChrisMicro/BluePillSound
In my opinion it is better to directly move to a stronger MCU than the STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog because with a more complex sound generation this MCU reaches its limits soon.
I would also not recommend to use the L476 because this MCU is made for low power applications and can only run up to 80MHz. A better choice is the F407 and the the F407 discovery board has a build in audio DAC.
Here I tried 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 F401 because it was laying around. But the F407 is better.
Now I ordered a F411 discovery because it is cheaper than the F407 discovery. We’ll see how it works.

The best thing would be to port the Audio-Lib from Early Hill Power ( ESP ) to the 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 . Probably it would not be too difficult and it has a build in MP3 decoder.

Tue Oct 02, 2018 8:40 pm

Thanks both for your replies. I’m stunned. I came home today, resolved to come on here and answer you both, then settle down to start porting my existing midi software over to 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 board. But guess what? My chinese boards arrived. I ordered them on the 20th, the dispatch note said they would arrive in November, but both my programmer and board were waiting for me after only 12 days. I don’t think that’s bad at all.

I’ve got blink up and running, just about to start fiddling around with mozzi.

The weird thing is I tried to work out what to do with bootloaders and things, went round in circles for a while but wasnt able to upload a bootloader using my ST link clone. Decided to get roger’s core installed and try the command line option using the instructions here: https://github.com/rogerclarkmelbourne/ … ill-Boards

But for the sheer devilment I selected ST link as the upload method and just tried to upload a sketch… worked first time and is now blinking away..
..time to try mozzi.

Shame to hear USB midi is for “freaks”. Seems I’m a freak too! :)

Tue Oct 02, 2018 9:15 pm

To be honest and a *very* private opinion: I always use the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog clone for uploading (only exception: Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog clone). I got so many troubles in the past (especially on my MacBookMacBookModules, instruments and finished devices…S war Smile I’m using mainly OSX, so I’m searching for every OSX related tool for my macbook without starting Parallels. Meanwhile I do all my 3d printing stuff on windows only, b…View in hardware catalog Pro 13′ 2009). ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog always works for me ,no matter which board (F1 to F4) or OS. I have too many things for debugging, so I do not want also “debug” the upload method. (Lazy? Yes!)
About freaks: Yes, we *are* freaks doing synth stuff with STM32F*** ;) But neither on Energia (TI variant of Cortex Mx cores) or Chipkit (PIC32PIC32Microcontrollers and processors…operly. I also found out that some SD-card adapters work better with specific MCU’s ( PIC32 , Tiva-TM4c123, STM32) and some do not. Sounds a little bit esoteric, but I didn’t have…View in hardware catalog ) [I leave aside official “Arduino” products, because they are unreliable and too slow for “real” synth things] there aren’t so many freaks as here – and (I speak for Rogers Core) no “Arduino” implementation has so cool “out of the box” things (MIDI USB) and examples as on stm32duino.

Tue Oct 02, 2018 9:30 pm

[madias – Tue Oct 02, 2018 9:20 pm] –
BTW: A real cool “candidate” for synth stuff is this: https://www.aliexpress.com/item/1PCS-ST … 03267.html

Looks nice – I like the form factor and the extra hardware built in. Have you tried TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog out? The library seems to have all kinds of fun things. It is a relatively expensive board at £28ish in the UK, but the support looks great.

Tue Oct 02, 2018 9:52 pm

Shame on my, I do not own a TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog board. Nearly everything synth/audio related in “Arduino land” was touched by the hand of Paul J. Stoffregen in the past. I adapted many of his codes. TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog boards are (in relationship with 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 aliexpress) expensive, but with a superb&outstanding support. If you can afford it, buy one. You wont pay for the hardware (ok, the board layouts are also really good!), but you’ll pay Paul and his company (hopefully).
And the Teensy 3.6Teensy 3.6Development and computing boards…sy. I’m curious to see how the 1Bitsy compares against the Teensy 3.2. Also have the Teensy 3.6 , STM32F407 Discovery and STM32F469 Discovery and a Netduino 2 Plus. Smile As you c…View in hardware catalog is MCU hardware as it should be: https://www.pjrc.com/store/teensy36.html

Wed Oct 03, 2018 3:43 am

Yes, the software for the TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog of Pauls Stoffregen is really good.
I was thinking about to port some of his things but then I decided: NO
Why? Because he put so much effort in his things and he is earning a little bit of money by selling his Teensies so I think it is better to not destroy his market by porting the software to cheap STM-Nucleos.
Probably not as advanced as Pauls synthesizers there are some other things.
Pauls made the graphical synth tool here.
Here I adapted another synthesizer with GUI some 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 boards.
It is not as advanced as Pauls version but nevertheless quite good I think.
Not all sound algorithms of the original equation composer are implemented but if you don’t need to used the graphical part they probably could easily be copied.
Then the equation composer library should be as advanced as the MOZZI library.

BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?

Wed Oct 03, 2018 5:49 am

[ChrisMicro – Wed Oct 03, 2018 3:43 am] –
BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?

I think SAI is compatible to I2S, but you are right, there might be some other register entries needed getting the “I2S compatibility mode”. Beside that, SAI is very interesting, there are cheap Audio DAC’s supporting SAI. Advantage: You can handle multiple I/O streams with SAI.

Wed Oct 03, 2018 2:15 pm

[madias – Wed Oct 03, 2018 5:49 am] –
[ChrisMicro – Wed Oct 03, 2018 3:43 am] –
BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?

I think SAI is compatible to I2S, but you are right, there might be some other register entries needed getting the “I2S compatibility mode”. Beside that, SAI is very interesting, there are cheap Audio DAC’s supporting SAI. Advantage: You can handle multiple I/O streams with SAI.

https://github.com/GrumpyOldPizza/ardui … raries/I2S

Works like a charm with a I2S microphone …

The SAI peripheral is more complex than the I2S off SPI. It allows more than 2 channels, and different slot encodings …

Sat Oct 06, 2018 6:11 am

[GrumpyOldPizza – Wed Oct 03, 2018 2:15 pm] –
https://github.com/GrumpyOldPizza/ardui … raries/I2S

Works like a charm with a I2S microphone …

Because I got a L432Nucleo I thougth I can give it a try on my Ubuntu. But it seems openocd has a problem:
.arduino15/packages/grumpyoldpizza/hardware/STM32L4STM32L4Microcontrollers and processors…ntu. But it seems openocd has a problem: .arduino15/packages/grumpyoldpizza/hardware/ stm32l4 /0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: li…View in hardware catalog /0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

Mon Oct 08, 2018 2:59 pm

[ChrisMicro – Sat Oct 06, 2018 6:11 am] –
[GrumpyOldPizza – Wed Oct 03, 2018 2:15 pm] –
https://github.com/GrumpyOldPizza/ardui … raries/I2S

Works like a charm with a I2S microphone …

Because I got a L432Nucleo I thougth I can give it a try on my Ubuntu. But it seems openocd has a problem:
.arduino15/packages/grumpyoldpizza/hardware/STM32L4STM32L4Microcontrollers and processors…ntu. But it seems openocd has a problem: .arduino15/packages/grumpyoldpizza/hardware/ stm32l4 /0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: li…View in hardware catalog /0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

You got to install the 32bit compatibilty libraries. Thought it said so in the instructions.

Post a reply

Optional · up to 10 MiB