STM have developed a HAL MX core

Information on the latest releases
User avatar
RogerClark
Posts: 5917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM have developed a HAL MX core

Post by RogerClark » Fri Sep 16, 2016 9:38 pm

Slammer wrote:The Nucleo F103RB board uses 8MHz HSE EXT (External Input Clock) generated from the other MCU on board. It is possible to change a bit the clock initialization function to use both HSE sources, eg. to try first with HSE_EXT and if this fails to try again with HSE_XTAL, with this trick the same code will work in Nucleo and other boards with external crystals.
The Nucleo L476RG is different story. The HSE_EXT connection is disconnected on the board, the MCU uses the new internal clock MSI (it is like HSI but much more stable and accurate) at 4 MHz.

Interesting..

Thanks.

User avatar
Slammer
Posts: 241
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: STM have developed a HAL MX core

Post by Slammer » Fri Sep 16, 2016 9:45 pm

Actually the L4 (and L1? I don't remember) family can be almost "crystal-less" because of new internal clock MSI.

From the datasheet:
Multispeed internal RC oscillator (MSI), trimmable by software, able to generate 12 frequencies from 100 kHz to 48 MHz. When a 32.768 kHz clock source is available in the system (LSE), the MSI frequency can be automatically trimmed by hardware to reach better than ±0.25% accuracy. In this mode the MSI can feed the USB device, saving the need of an external high-speed crystal (HSE). The MSI can supply a PLL.
Last edited by Slammer on Fri Sep 16, 2016 10:19 pm, edited 1 time in total.

User avatar
RogerClark
Posts: 5917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM have developed a HAL MX core

Post by RogerClark » Fri Sep 16, 2016 9:50 pm

MSI sounds a cool feature.

User avatar
RogerClark
Posts: 5917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM have developed a HAL MX core

Post by RogerClark » Fri Sep 16, 2016 11:15 pm

FYI

I create a new section for this core

viewforum.php?f=48

I think perhaps we should now start separate threads in that section for each topic

User avatar
Vassilis
Posts: 294
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: STM have developed a HAL MX core

Post by Vassilis » Sat Sep 17, 2016 6:45 am

Wow! An official arduino core for STM32 MCUs !
I can wait to test it :)

User avatar
RogerClark
Posts: 5917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM have developed a HAL MX core

Post by RogerClark » Sat Sep 17, 2016 7:12 am

Only works with Nucleo F103RB at the moment, but rick has done a quick verison to test the BluePill

There is a separate thread in a new section for this http://www.stm32duino.com/viewforum.php?f=48

rreignier
Posts: 16
Joined: Tue Feb 16, 2016 8:52 pm
Location: Toulon, France

Re: STM have developed a HAL MX core

Post by rreignier » Mon Sep 19, 2016 6:12 pm

That is a very good news for the community!
There was no reason STM32 did not get official support for an Arduino API.
I am following the progress in the dedicated forum section and on Github!

User avatar
RogerClark
Posts: 5917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM have developed a HAL MX core

Post by RogerClark » Sat Sep 24, 2016 12:17 pm

With the help of Rick, I've put together a first pass at adding the BluePill to the STM Core

At the moment there isn't any support for USB Serial.

Upload should be possible via STLink (I have tested this), and via USB to Serial, and also via Blackmagic probe.

If you have the bootloader installed, and manually reset the board, the bootloader upload option may work, but I've not had time to test this and the code may not run even if it uploads, though I have tried setting the vector offset and changed the linker file etc


To test, you'll need to make a new folder in your hardware folder and download or clone both the Tools and the F1 core

https://github.com/stm32duino/Arduino_Tools
and
https://github.com/stm32duino/Arduino_Core_STM32F1

(Of course you need the arm compiler installed as usual for libmaple)

Note. if you want to compile the variant library file (for the bluepill) and you are using windows, you'll need to change the path in gcc,mk, as I've not had time to figure out how to use %APPDATALOCAL% in a makefile to get the path to where the Arduino IDE hides the arm toolchain

User avatar
Rick Kimball
Posts: 850
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: STM have developed a HAL MX core

Post by Rick Kimball » Sat Sep 24, 2016 7:06 pm

The linux tools seem to be missing the execute bit setting .. * 664 vs 775
-rick

User avatar
Rick Kimball
Posts: 850
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: STM have developed a HAL MX core

Post by Rick Kimball » Sat Sep 24, 2016 7:14 pm

the linux 64 bit tools are not used even though I'm running 64 bit linux.

This fixes just the stlink utils:
$ git diff -w platform.txt
diff --git a/platform.txt b/platform.txt
index ee3edc6..0995c32 100644
--- a/platform.txt
+++ b/platform.txt
@@ -133,8 +133,8 @@ tools.stlink_upload.cmd=stlink_upload
tools.stlink_upload.cmd.windows=stlink_upload.bat
tools.stlink_upload.path.windows={runtime.hardware.path}/tools/win
tools.stlink_upload.path.macosx={runtime.hardware.path}/tools/macosx
-tools.stlink_upload.path.linux={runtime.hardware.path}/tools/linux
-tools.stlink_upload.path.linux64={runtime.hardware.path}/tools/linux64
+#tools.stlink_upload.path.linux={runtime.hardware.path}/tools/linux
+tools.stlink_upload.path.linux={runtime.hardware.path}/tools/linux64
tools.stlink_upload.upload.params.verbose=-d
tools.stlink_upload.upload.params.quiet=
tools.stlink_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
-rick

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest