Page 11 of 11

Re: STM32L4 Core

Posted: Thu Nov 24, 2016 12:36 pm
by GrumpyOldPizza
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.

Re: STM32L4 Core

Posted: Wed Dec 21, 2016 3:37 pm
by GrumpyOldPizza
GrumpyOldPizza wrote:
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

    uint32_t STM32.resetCause();
    uint32_t STM32.wakeupReason();

    void  STM32.sleep();
    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);
    void  STM32.reset();


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.

Re: STM32L4 Core

Posted: Sat Jan 14, 2017 5:20 am
by GrumpyOldPizza
Quick update. Added SDCARD support via SDIO and SPI for Ladybug/Butterfly/Dragonfly.

Also for NUCLEO-L476RG SDIO is exposed on the PC8/PC9/PC10/PC11/PC12/PD2 pins, and SDCARD via SPI on PC10/PC11/PC12/PD2.

The code will work with most breakout boards that have no pullups on CS/DAT3. SDIO is a tad fiddely, as cabling can have an adverse effect.

SPI gets around 2.3MB/sec, SDIO with default speed (read 24MHz) is at roughly 11MB/sec, and SDIO with high speed (read 48MHz) get about 22MB/sec. Write rates differ from card to card though. A class 10 card will not get more than 10MB/sec ...

USB support is now configurable, so that either CDC or CDC+MSC (or none) can be selected.

- Thomas

Re: STM32L4 Core

Posted: Tue Jan 17, 2017 1:08 pm
by jucelyn
Hi I'm new to stm32duino

First, thanks for yours jobs, It makes the stm32 comes in Arduino world!

here is the problem that i face:

Serial.print() is working well but Serial.read() did not return any response while i send out data

anyone can help pls, sorry for the stupid question

Re: STM32L4 Core

Posted: Tue Jan 17, 2017 11:07 pm
by Guidoted
Sorry but I can't find the json file to install the package.
Could you, please, give the correct path to be added on Arduino Preferences?
Thanks a lot and ciao from Italy

Re: STM32L4 Core

Posted: Wed Jan 18, 2017 10:26 pm
by GrumpyOldPizza
Guidoted wrote:Sorry but I can't find the json file to install the package.
Could you, please, give the correct path to be added on Arduino Preferences?
Thanks a lot and ciao from Italy


Sorry for the delay. Got to clean up a few things for Ladybug/Butterfly and then there will be a new *.json file. Sorry for the inconveniance.

If you'd like you can simply download the github and install that directly.

Re: STM32L4 Core

Posted: Wed Jan 18, 2017 11:42 pm
by Guidoted
Thanks for the quick answer!
I've tried manual installation but no luck... (Arduino 1.8.0 on W10-64)
Best regards
Guido

Re: STM32L4 Core

Posted: Thu Jan 19, 2017 12:22 am
by GrumpyOldPizza
Guidoted wrote:Thanks for the quick answer!
I've tried manual installation but no luck... (Arduino 1.8.0 on W10-64)
Best regards
Guido


What was the problem ? Normally using the json file is simpler, but does the very same thing.