RogerClark wrote:Did you just unzip all the files directly into the hardware folder. If so you need to make a folder called STM32L4 and move the files into that folder then restart your IDE. (as the IDE supports multiple third party cores and each needs to be in their own folder under the hardware folder)
Create a ~/Arduino/hardware/grumpyoldpizza/STM32L4 and put all the files from github in there. Also install the SAMD core to pull in the compiler and such.
There is an official json file where all of this is automated, but because we are in the middle of adding 2 new cpus, so the code is in flux.
Haven't updated that here in a while. There is now a kickstarters for a pair of L432 and L433 boards (https://www.kickstarter.com/projects/21 ... ent-boards
). They are nicely supported in via the code on github (https://github.com/GrumpyOldPizza/arduino-STM32L4
), but there are some features/details still missing that I'd like to add before updating the installable image (via json file).
New is some experimental power management code:
Code: Select all
bool STM32.stop(uint32_t timeout = 0);
void STM32.standby(uint32_t timeout = 0);
void STM32.standby(uint32_t pin, uint32_t mode, uint32_t timeout = 0);
void STM32.shutdown(uint32_t timeout = 0);
void STM32.shutdown(uint32_t pin, uint32_t mode, uint32_t timeout = 0);
Experimental because not all the internal locks have been added to avoid entering for example "STOP" mode, while an active peripheral still was ... well, active. But nice to play with.
A new keyword has been added "retained". If you add that to a variable declaration, then it will be treated like a normal initialized data element (".data" section). Except if you return from "STANDBY" mode. In that case it will keep the value it had before entering "STANDBY" mode. So kind of battery backed RAM. L476 has 32k, L432/L433 have 16k of that.
There is now also a "I2S" class, API wise same as has been added to Arduino Zero for their MKRZERO product lately. Figured it would be a waste pusblishing an API that does the same, but is different. N.b there is also a ArduinoSound library (https://www.arduino.cc/en/Reference/ArduinoSound
) that is layered ontop of this I2S class. Hence lots of bits to play with, although the current code is the first pass, so expect some bugs.