2019-01-23 08:55 AM
The program is alternating between two modes, one is high performance and the second is low power. For perfomance mode the ADC is used with a timer triggering and DMA+interrupt at fast rate. In the low power mode it is intended to make a single conversion triggered by software on a very slow pace. The clocking is also different. Now I am using custom code to switch peripheral configuration between the two modes. I Would like to use CubeMX for both, in the cleanest possible way. Any good experience to share? Thanks!
Solved! Go to Solution.
2019-01-23 10:24 PM
For dynamic HW peripheral configuration, better code directly in the project source file.
The CubeMX starting point maybe the most perceived complex of the configuration.
2019-01-23 09:28 AM
Seems to exceed the scope of the tool.
Would really need a template, would see if any of the examples demonstrate multi-mode operation, but in most cases are overly simplistic and not real-world applications.
2019-01-23 03:26 PM
Thank for your answer. I was thinking about methods like having two MX projects, and making a copy-paste operation on one of the two projects to bring the second configuration in the main project and edit the files to change main() for a new function name that can be called. This may be automated with scripting. Just thinking loud.
2019-01-23 10:24 PM
For dynamic HW peripheral configuration, better code directly in the project source file.
The CubeMX starting point maybe the most perceived complex of the configuration.
2019-01-25 12:21 PM
ST: Your competitors' configuration tools explicitly provide for setting up multiple clock and power configurations so you can switch between them. This is important; lots of customers have this requirement (slow-lowpower <-> fast-highpower)!
2019-02-07 12:55 PM
"This may be automated with scripting."
Is it worth spending time on writing scripts to automate the automation (code generation)? That time can be spent on writing actual C code, which can also be much more configurable and modular than automatically generated buggy unstable and inflexible bloatware.
2019-02-07 01:08 PM
Thank you all for your answers! Until ST add this feature to the CubeMX, I will program the configuration changes directly. This is the simplest!