2024-04-09 03:07 AM
Solved! Go to Solution.
2024-04-09 09:04 AM - edited 2024-04-09 11:26 AM
The threshold is definitely "look it works"
I think some investment of time here, both in the BSP for ST product, or more broadly popular/likely product selected by the customer, would make the platform much more appealing. At this point I think it's time/resource constrained.
The examples are generally coded by people with about as much competence as the customers, perhaps a little more, and with better/deeper support team behind them, but it definitely not what I'd call production code. Customers are expected to take it and rework/refactor to suit their standards, and deal with error handling better than stopping and dying.
The problem is generally compounded by a want everything, pay nothing attitude. Nobody really wants to pay for good "help" or code at this point. So the market adapts, gets some "working" code, and Just Sends It!
2024-04-09 04:09 AM
In my opinion the vast majority of ST code as generated/supplied by Cube, HAL, LL is "demonstration" code. It is there to enable us to throw something together quickly and easily with a fair chance that it will work.
I do not think they aspire to make the code efficient (or, for that matter truly reliable). I rather suspect that with some of their code, attempts to improve efficiency will break the code because of things like needing to enable clocks to a peripheral a certain number of peripheral-ticks before the first write to that peripheral.
And I have yet to see any rigorous documentation (by which I mean explanations along the lines of "you should do this in this particular order and keep these arguments to those values").
My approach is to base my code on the Reference Manual. Only where I need to get a demonstration together quickly or I'm struggling to understand the Reference Manual* will I look at HAL.
*This happens more often than I like. But I do persevere.
2024-04-09 07:20 AM
I think you are correct about the creation side of the BSP code, but unfortunately I think that there are a ton of shipping products with the ST supplied code (unchanged) in them.
2024-04-09 09:04 AM - edited 2024-04-09 11:26 AM
The threshold is definitely "look it works"
I think some investment of time here, both in the BSP for ST product, or more broadly popular/likely product selected by the customer, would make the platform much more appealing. At this point I think it's time/resource constrained.
The examples are generally coded by people with about as much competence as the customers, perhaps a little more, and with better/deeper support team behind them, but it definitely not what I'd call production code. Customers are expected to take it and rework/refactor to suit their standards, and deal with error handling better than stopping and dying.
The problem is generally compounded by a want everything, pay nothing attitude. Nobody really wants to pay for good "help" or code at this point. So the market adapts, gets some "working" code, and Just Sends It!