STM32F746 and HAL

Any other STM32 based boards
Post Reply
monsonite
Posts: 47
Joined: Tue May 05, 2015 10:34 am

STM32F746 and HAL

Post by monsonite » Sat Jul 25, 2015 3:18 pm

Hi All,

I have had a moderately successful week getting code to run on my new F7 board.

I am however finding the HAL code a little alien, having just gotten used to the standard peripheral libraries.

However, reading some of Sheepdoll's posts about using HAL on the '401 Nucleo board, it seems that this might ultimately assist the project in allowing us to readily port between families - using HAL as the common layer.

Undoubtedly, STM are pushing their customers more and more to use the Cube MX and HAL, so I guess we will just have to get used to it.

I think I can find enough example code from this site to get the GPIO and USARTs to work STM32duino using HAL - and ultimately I would be interested in seeing the whole STM32duino project working with F7 hardware and HAL.

I am looking into commercial production of my STM32F746 BOB board, talking with a friend in Shenzhen. If anyone would like a board for STM32duino development purposes - please get in touch, and we will try to find a way to make this happen, at the lowest possible cost to STM32duino subscribers. I am currently thinking that USD 30 would cover the cost of low volume production.

I realise that this group has coalesced partly around the availability of $5 '103 boards - yes they are amazingly cheap, and compared to AVR hardware are exceptional value for money. However a Cortex M7 based board will run at 3.5 times the throughput of a 72MHz M3, has 1MB of flash and 320K of SRAM, and that's why they cost a bit more.

I have a couple of weeks of "me-time" coming up, and propose to recut the BOB board onto the footprint of the Arduino MEGA, plus add the footprints to accept a mix of popular wireless modules including an ESP8266, HM11 BLE and the good old RFM12/69.

If this would be of interest to the forum - please send me some feedback.

I am firstly a hardware engineer and secondly a piss-poor programmer, so please allow me to contribute my strengths to this forum, and learn from others to improve my weaknesses.


Ken


STM32F7BOM_small.jpg
STM32F7BOM_small.jpg (172.79 KiB) Viewed 2065 times

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

Re: STM32F746 and HAL

Post by RogerClark » Sat Jul 25, 2015 10:01 pm

Ken

For the F7 I suspect you are correct in investigating SheepDoll's HAL version.

Testing SheepDolls maple mini variant is on my ToDo list, but I keep having new item pushed to the top of the list, so i have not got around to it.


At the moment, i think 90% of forum members are using the F103C series, which totally fulfil their needs.

Im not sure if its worth me creating a section for the F7 on its own. Perhaps change the F4 section to be F4 and F7

User avatar
sheepdoll
Posts: 233
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: STM32F746 and HAL

Post by sheepdoll » Sat Jul 25, 2015 10:45 pm

RogerClark wrote: I'm not sure if its worth me creating a section for the F7 on its own. Perhaps change the F4 section to be F4 and F7
Or create a sub forum just for HAL/CubeMX. There are also F0 and F3 variations. Does anyone really use F2?

F4 is sort of it's own entity, as there are direct ports of the Maple lib for it. That should retain it's own section. Otherwise things tend to get too noisy and cluttered.

monsonite
Posts: 47
Joined: Tue May 05, 2015 10:34 am

Re: STM32F746 and HAL

Post by monsonite » Sun Jul 26, 2015 9:25 am

Sheepdoll, Roger,

I agree - if you create a section for CubeMX and HAL - regardless of whether F4 or F7, that will make a good focal point for future discussion.

It's taken me a week to take on the basics of HAL, and I am still far from my comfort zone. Getting more people on board looking at this would be a good way make progress.


regards


Ken

victor_pv
Posts: 1481
Joined: Mon Apr 27, 2015 12:12 pm

Re: STM32F746 and HAL

Post by victor_pv » Sun Jul 26, 2015 7:53 pm

monsonite wrote:Sheepdoll, Roger,

I agree - if you create a section for CubeMX and HAL - regardless of whether F4 or F7, that will make a good focal point for future discussion.

It's taken me a week to take on the basics of HAL, and I am still far from my comfort zone. Getting more people on board looking at this would be a good way make progress.


regards


Ken
If I may chip in, I think a Cube MX / HAL section would be the best. Hopefully that will also help make the code more portable to new chips. Eventually F4 and F7 will be just as cheap as F1 are today, at which point it will probably make sense to most people to use them even for the most simple tasks, as we use the mini/pills boards today.

I think Roger started a discussion on whether we should try to improve the leaflabs code for F4, or start using the HAL. Given that the F7 just arrived and more will come, using the HAL makes the most sense to me. I remember reading comments before that STM official libraries are not the most efficient in terms of speed or memory use, but I'll rather have inefficient code that runs, than have more efficient code that only works partially, and I think it would take less effort to use the HAL and improve where there is room for improvement, than upgrade all the libmaple code to new cores as they come out. Just my 2 cents.

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

Re: STM32F746 and HAL

Post by RogerClark » Sun Jul 26, 2015 11:17 pm

Guys,

I've created a new forum under Bootloaders and Cores

viewforum.php?f=46

i.e

This development is not specifically for the F4 or F7, it will eventually apply to the F103 and probably the F3 etc.

I'm a bit pushed for time, so I've not posted an initial topic to the new section, but feel free to do so yourselves ;-)

monsonite
Posts: 47
Joined: Tue May 05, 2015 10:34 am

Re: STM32F746 and HAL

Post by monsonite » Sat Nov 21, 2015 1:47 am

Hi All,

I have spent the day coding a virtual machine, a stack processor in C - and have ported it to everything from a 16MHz Arduino, a 72MHz STM32F103, a 168MHz STM32F407 Discovery board and finally at 1am - my 216MHz STM32F746 Cortex M7 Break-out-Board BOB.

The results are in - when executing a simple loop of 7 instructions that increments a memory location - and measures the time to do 1 million instructions.

Arduino ATmega328 16MHz 67,000 emulated instructions per second

STM32F103CB 72MHz - 404,000 i.p.s.

ZPUino - a stack processor that runs on a Papillio Duo Spartan 6 FPGA board - programmed in Arduino 152,000 ips

STM32F4 Discovery 168MHz 3,000,000 to 3,580,000 ips depending on optimisation level.

STM32F746 BoB 216MHz 9,000,000 to 27,000,000 ips - again depending on compiler optimisation.


I have written it up in my blog here http://sustburbia.blogspot.co.uk/2015/1 ... -jips.html


Have a great weekend


Ken

stevech
Posts: 441
Joined: Thu Aug 27, 2015 6:32 am

Re: STM32F746 and HAL

Post by stevech » Sat Nov 21, 2015 4:58 am

monsonite wrote:Sheepdoll, Roger,

I agree - if you create a section for CubeMX and HAL - regardless of whether F4 or F7, that will make a good focal point for future discussion.

It's taken me a week to take on the basics of HAL, and I am still far from my comfort zone. Getting more people on board looking at this would be a good way make progress.


regards


Ken
I'm experienced with HAL and CubeMX. But most people on this forum are focused on Arduino-alike libraries and IDES.

User avatar
mrburnette
Posts: 1794
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: STM32F746 and HAL

Post by mrburnette » Sat Nov 21, 2015 2:28 pm

stevech wrote:
monsonite wrote:Sheepdoll, Roger,

I agree - if you create a section for CubeMX and HAL - regardless of whether F4 or F7, that will make a good focal point for future discussion.
<...>
regards

Ken
I'm experienced with HAL and CubeMX. But most people on this forum are focused on Arduino-alike libraries and IDES.

I think this is not the case: Yes, I have been vocal about the ArduinoIDE and libraries - but my target was strictly in the STM32F1xx series, the old Maple & Maple Mini uC's.

For the STM32 series such as the F4 onward, HAL and CubeMX have great promise as the Arduino "core" approach is architectually not well-suited, IMO.
There is a difference in my reasoning with the F1 as we have many members from Arduino.cc who migrated here because of the need for more SRAM and uC throughput and inexpensive boards starting at $4. Evolution should not abandon them and their comfort level with the ArduinoIDE and libraries.

Ray

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest