2016-01-26 02:29 AM
Hi everybody.
I confuse.I just begun study STM32 series.In a month, i studied hard STM32F3, F4 and i used Standard Perish Library.But, when i used STM32CubeMX, this application creat HAL base projects.what is better selection?2016-01-26 03:25 AM
The best choise is put away any library. Use register based programming style. Library use only for examples or help in some troubles.
2016-01-26 03:38 AM
> The best choise is put away any library. Use register based programming style.
Only the best choice for a hacker, doing single-device projects. If you develop for a device platform with several similar, but different controllers, you want to re-use as much code as possible, to cut costs for development time and testing. That's what a good library delivers. The 'old' SPL is stable, but abandoned by ST, and not available for the latest MCUs. The CubeMX is new, supported, and littered with bugs. And the ''Click and Drag'' approach (IMHO) totally misses ST's most important target audience. Or, as Murphy's Law states ''A software designed for idiots is only used by idiots''. Finally, the choice is yours.
2016-01-26 04:20 AM
> The best choise is put away any library. Use register based programming style.
Only the best choice for a hacker, doing single-device projects. You are VARY not true. Probably you don't now what you say.
2016-01-26 04:31 AM
> You are VARY not true. Probably you don't now what you say.
Perhaps true. But at least a dozen of companies in the embedded business, existing longer than a few month or years, are seeing it my way.
2016-01-26 05:45 AM
And what?
I now many companys using STM32but NOT using any library. ST sales department says this same.
2016-01-26 06:15 AM
> ST sales department says this same.
That says it all.
2016-01-26 06:22 AM
It doesn't make it very portable, or transferable to others and can take hours to get right and debug. Most of the examples I see, claim to do it for efficiency, but are woefully implemented and poorly commented.
If it works for you, great, but it is not how I'd recommend doing it.2016-01-26 06:43 AM
> It doesn't make it very portable, or transferable to others and can take hours to get right and debug.
1. Good register based code is much more portable than any library HAL or espessialy SPL. 2. Is much more debuguble.You directly see what must be in register. 3 Many people cry when they want to port aplication prom L1 (SPL) to L0 (SPL never exist). In reg based coding this wil take port this will take only few days. 4. How many aplication starts be development before any library be develop. (I'm one of very good exaples of it). 5. How many mistakes have SPL or HAL. ( quick look up of this forum 1 of 4 topic are bug report). 6. Effeciency 7. Better knowleage of architekture of periferals and core. 8. What if after few years HAL will be ambadonned? .... This is my opinion2016-01-26 07:26 AM
> It doesn't make it very portable, or transferable to others
SPL does not do much in way of portability either; the compatible peripherals do, but then it really does not matter whether you use SPL or not. > and can take hours to get right and debug. Eh? > Most of the examples I see, claim to do it for efficiency, but are woefully implemented and poorly commented. Omitting your examples, most SPL-based (or any other library-based) examples I see are woefully implemented and poorly commented. > If it works for you, great, but it is not how I'd recommend doing it. +1 (i.e. if ''libraries'' work for you, great, but it is not how I'd recommend doing it ;) ) JW