cancel
Showing results for 
Search instead for 
Did you mean: 

Is Cube MX generated HAL code used in development for production? Or is it better to write code from scratch for a product?

Shashank TS
Associate II

I have to develop a product which makes use of STM32. So I was wondering if anyone makes use of STM32 CubeMX in actual product or is it just meant for prototyping.

2 REPLIES 2

Whatever you do you're going to have to thoroughly test the code, and customize it to your specific application.

CubeMX can provide a framework, but you'll need to handle errors and recovery, rather than die in some while(1) loop.

I can see the pin allocation and initialization to be useful, but its not going to make anyone a "better" developer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kurta999
Senior

Almost 90% of them can be used, or used as base with some small modifications - it depends on your needs. We do the same and everything works without any problem.