cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMx LSE drive capability issue

Gianluca Costa
Associate II
Posted on June 28, 2018 at 17:07

I found an issue with the latest (and updated) STM32CubeMx when generating code both for SW4STM32 and for  MDK-ARM relate to STM32F746 board.

Changing 'LSE Drive Capability' from ''LSE oscillator low drive capability' to 'LSE oscillator high drive capability' doesn't produce any changing into the code generate by STM32CubeMx.

To enable ''LSE oscillator low drive capability'  I have to add to the code the lines:

  HAL_PWR_EnableBkUpAccess();

  __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_HIGH);

But when I use again CubeMx to generate the code it remove my code...

Info about versions use by me.

   CubeMx version: 4.26.0

   STM327CubeF7: 1.11.0

Ciao.

Gianluca

#stm327cubef7 #lse-startup
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 05, 2018 at 10:33

Hi

Costa.Gianluca

 ,

Thanks for your feedback and for your willingness to improve CubeMX.

This issue will be fixed next CubeMX release.

Please do not hesitate to contact me for further details.

Best regards,

Mohamed

View solution in original post

2 REPLIES 2
Khouloud GARSI
Lead II
Posted on June 28, 2018 at 18:19

Hi

Costa.Gianluca

,

Changing &39LSE Drive Capability&39 from &39&39LSE oscillator low drive capability&39 to &39LSE oscillator high drive capability&39 doesn&39t produce any changing into the code generate by STM32CubeMx.

-> We will check the issue you&39re seeing.

But when I use again CubeMx to generate the code it remove my code...

-> In order to keep your code protected, you should place it between &39USER CODE BEGIN&39 and &39 USER CODE END&39.

Otherwise, CubeMX will overwrite it.

Khouloud.

Posted on July 05, 2018 at 10:33

Hi

Costa.Gianluca

 ,

Thanks for your feedback and for your willingness to improve CubeMX.

This issue will be fixed next CubeMX release.

Please do not hesitate to contact me for further details.

Best regards,

Mohamed