2017-07-12 07:09 PM
Is there a way to change MCU in STM32Cube without having to regenerate a new project? E.g I just want to change from a 16kB part to a 32kB part, exactly the same series - when I do this via the Pinout->List Compatible MCU's, it creates a new project which overwrites all my user code when I generate the code the first time! Also the clock configuration is not copied. I'm using V4.19 of Cube.
#stm32cube2017-07-12 08:20 PM
I have not found a way to do it within CubeMX itself. You can manually edit the ioc file and this usually works. If you pick a part that has a different feature set than what you are currently using, CubeMX can get a little confused.
It would be nice to have the ability to do this easily within CubeMX itself. But there are lots of complications with that. I can imagine it would be a tough feature to support. I needed to switch between an STM32L433CC and an STM32L452CE part, but I was using a timer on the 433 that doesn't exist on the 452. How should CubeMX handle that?
2017-07-13 01:59 AM
Hello,
It's possible with
STM32CubeMX to switch easy from MCU to another microcontrollerof the same seriesby importing a saved configuration to a new MCU project.
For more detail about STM32CubeMX tool, take a look to this user Manual
/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fuser_manual%2F10%2Fc5%2F1a%2F43%2F3a%2F70%2F43%2F7d%2FDM001047pdf%2Ffiles%2FDM001047pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM001047pdf
, in s
ection (6.9 Switching to another MCU)
I recommend you to use the latest version of STM32CubeMx version (V4.22) as contains enhancements implementation and fixes defects.
With Regards
Imen
2017-07-13 07:04 AM
Thanks Imen - yes I tried this feature already, however you have to go and painfully find all your user code sections and copy them across from the other project, I was expecting a more streamlined process! Also, the version V4.19 I was using would not import many of the parameters for the HRTIMER, I2C etc, with messages saying the values were not supported (even though they clearly were), and had been reset to defaults. I'll try with V4.22 and see if that problem is fixed.
I just want to change from a STM32F334K4 to a STM32F334K6 part (more memory) - exactly the same feature set.
2017-07-13 07:06 AM
I like the sound of that hack - like you say though, you would not want to change to a MCU with a different feature set this way!
2017-07-13 07:23 AM
Merge tools also make things easy to migrate back and forth, fork the project so you don't break your starting point, and pull back in anything that Cube stomps on.
2017-07-13 07:33 AM
Hi again - I tried with the new version V4.22 and found it still cannot import my project without errors.
I get these errors when I try to import a project TO AN IDENTICAL MCU!
Some parameters can't be imported for ADC1
Can't import parameter:Channel = ADC_CHANNEL_TEMPSENSOR, it isn't a possible value in STM32F334K4Tx, it's set to default value. Some parameters can't be imported for HRTIM1 Can't import High Resolution:High Resolution to reach steps down to 217 ps (4.6GHz Equivalent Frequency) = DLLSimpleCalibration, it isn't a possible value in STM32F334K4Tx, it's set to default value. Can't import High Resolution:Calibration Rate, it doesn't exist in STM32F334K4Tx Can't import High Resolution:Timeout (in ms), it doesn't exist in STM32F334K4Tx2017-07-13 08:57 AM
I will raise your feedback internally to CubeMx team.
Regards
Imen
2018-01-30 05:28 AM
Hi
Marks.Sasha
,I reproduced the issue you highlighted on the latest CubeMX release.
For your information, our development team are working on some features that will improve the Import project functionality. I can't give you any date for the moment but you will see some improvements in the future.
For the moment, the workaround is to edit the ioc file and change thePCC.PartNumber and theMcu.UserName from
STM32F334
K4Txto STM32F334
K6Tx.I hope it will help you.
BR. Jeanne