How the System clock is set in the files? I see uint32_t SystemCoreClock = 4000000U in system_stm32l4xx.c however I had set 120MHz in CubeMX for SysClock...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 1:24 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 2:50 PM
It is a placeholder. The part doesn't start at 120 MHz.
Once you actually call code to configure the clock sources and PLL, it back computes the RCC/PLL settings and HSI, MSI and HSE, and writes a value to the variable.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 2:48 PM
When the chip starts, it runs from the 4MHz clock.
The clock is changed in SystemClock_Config which is called from main. The SystemCoreClock variable is updated within the SystemClock_Config function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 2:50 PM
It is a placeholder. The part doesn't start at 120 MHz.
Once you actually call code to configure the clock sources and PLL, it back computes the RCC/PLL settings and HSI, MSI and HSE, and writes a value to the variable.
Up vote any posts that you find helpful, it shows what's working..
