Hello @MOB
First let me thank you for posting.
SYSCLK and SystemCoreClock are related, but they have different meanings.
SYSCLK is the system clock, which is used to drive the core and the buses of the microcontroller. It is typically sourced from a clock generator (such as the MSI or PLL), and its frequency can be configured by the user. In your case, you have configured the SYSCLK to be sourced from the MSI, and to have a frequency of 32 MHz
SystemCoreClock, on the other hand, is a variable that holds the current core clock frequency. It is used to configure the clock of different peripherals, and it is automatically updated by the system to reflect the current SYSCLK frequency. In your case, you have configured the core clock to be 8 MHz, which is obtained by dividing the SYSCLK by 4.
The LL_SetSystemCoreClock(8000000); set this global variable, SystemCoreClock to 8000000 so that it reflects the current frequency of the core clock.
The LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_MSI); is setting the Source of SYSCLK to MSI.
So, to sum up, the SYSCLK is 32MHz and the SystemCoreClock is 8MHz. The SYSCLK is used to drive the core and the buses of the microcontroller, while the SystemCoreClock is used to configure the clock of different peripherals, and it holds the current core clock frequency.
Thx
Ghofrane