cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable SystemClock_Config autogen on Project Manager?

gio_dmc
Associate

Greetings,

This is my first ever post on the Forum so if I selected wrong tags for the post or wrong Location feel free to inform me.

I'm using an STM32F410RB Nucleo board and I would like to experiment with register level coding instead of using HAL.

I would like to start by learning the system clock configuration but CubeMX automatically generates the SystemClock_Config function.

I would like to disable this setting but CubeMX doesn't allow me to uncheck the RCC Code Generation box under: Project Manager > Advanced Settings > Code Generation (picture below).

Is there a way to uncheck this setting? Is it possible that for F4 series this cannot be changed?

[The "Do not generate function call" only disables the function call in the main.c file so it's useless...]

Thanks in advance for any help.

BTW as you can see I've selected the LL Driver selector instead of HAL and the default SystemClock_Config udated accordingly. What's the difference between using the LL drivers and coding directly on registers? It seems to me that LL Drivers are a slight abstraction above register coding, but idk for sure...

 

Edit1: I also found the UM1718 where CubeMX settings are explained and the relevant section is 4.11.3, but it  only says that "...automatic generation can be disabled per peripheral or middleware in the Generate code column" so that doesn't help :(:(

 

Cattura.PNG

1 REPLY 1
TDK
Guru

Don't think it's possible. What exactly is the utility of having SystemClock_Config not be generated? Options already exist to prevent it from being called, as you saw. Surely you can make your own clock config function if you want and call that.

If you feel a post has answered your question, please click "Accept as Solution".