2018-03-27 08:55 AM
Hi
I have been learning the STM32 for a short period now, and can use the CubeMX and also write code using registers only. I know there is more control using registers, but find that a project can be made a lot quicker using HAL/Cube. Is the CubeMX just for testing/learning, or can professional projects be written using HAL/Cube? What is every ones opinions?
Many Thanks
Scott
2018-03-27 09:02 AM
You want to start a flame war, do you ? ;)
2018-03-27 09:10 AM
Pretty much the same question just asked on the Atmel forum:
https://community.atmel.com/forum/professionals-and-asf-arm
Is this a group exercise, with one posting in each manufacturer's forum, to see if you can find a consensus ... ?
2018-03-27 10:17 AM
About the same question had been asked here, if you make use of the search.
Those thread went the way religious discussions use to go...
2018-03-27 11:16 AM
Im not in that group, so never saw the post
2018-03-27 02:04 PM
Think of using the registers as using assembly language: in the right hands, it is a powerful. In the wrong hands, it is much easier to make a mess.
Cube is very useful in getting you up and going on most jobs. However, debugging it can be a pain, and for those once in a while applications, going to the registers can be faster and less painful.
I use spl from time to time but mostly roll my own. I have never been asked by anyone to use cube.
2018-03-27 03:32 PM
Is the CubeMX just for testing/learning, or can professional projects be written using HAL/Cube?
Note that those are two separate things with some common interfaces - CubeMX is the setup/code generator program, and HAL/Cube is a 'library'.
And you've answered yourself:
I know there is more control using registers, but find that a project can be made a lot quicker using HAL/Cube.
So, CubeMX and Cube/HAL are good for projects which have to be made quickly (which happens if those projects match the 'usual' usage patterns supported in both) and don't require much control. And if they are paid for, they are by definition 'professional'.
JW
2018-03-27 04:15 PM
its a question of complexity.
the complexity is squared for the chip size.
ie, LQFP 32 STM32F103, its an easy enough job by hand,
but when you have 176-240 pin STM32F7 I would guess it is extremely difficult by hand,
but don't forget the PCB.
I would say, from scratch, its very unlikely that you would be able to design a high density working board without the cube.
I use the cube to make my PCBs and then the initialisation code comes up and we get to while(1);
did you see the range of clock options inside the H7 part ?
very difficult to set the clock configuration without the cube.
2018-03-30 05:48 AM
I see what you mean, I wouldnt fancy trying that one.
Thanks
Scott
2018-03-30 05:49 AM
Thanks for that, much appreciated
Scott