Skip to main content
Wissem Chouchene
Visitor II
Nov 18, 2018 9:24 AM UTC
Solved

about enabling peripheral in STM32CubeMx

When enabling a peripheral in STM32CubeMx (switch from disable to enable) Does this mean that its clock wil be activated in the program after generating the initialization code for a given IDE 

and we don't need to insert the   __HAL_RCC_peripheral_CLK_ENABLE() function ? 

thank you 

Wissem

This topic has been closed for replies.
After Forever
After ForeverBest answer
Senior III
Nov 19, 2018 11:33 AM UTC

Yes, STM32CubeMX's code generator takes care of that.

<grumpy mode>

You could have easily checked it yourself in a minute by enabling a peripheral and observing the generated code, but I guess it's easier to ask :)

</grumpy mode>

1 reply

After Forever
After ForeverBest answer
Senior III
Nov 19, 2018 11:33 AM UTC

Yes, STM32CubeMX's code generator takes care of that.

<grumpy mode>

You could have easily checked it yourself in a minute by enabling a peripheral and observing the generated code, but I guess it's easier to ask :)

</grumpy mode>