What will happen when I forget to call system clock configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 9:47 AM
Hi People,
I need to know what will happen when I forget to set the clock configuration by using system clock configuration function.
Is there any default clock configuration will set in the microcontroller when I forget to set clock configuration?
I'm raising this because I can able to feed the complied code which doesn't have a clock configuration. And still I can able to debug the uploaded code with stm32h7.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 10:06 AM - edited ‎2023-11-20 10:08 AM
Hello @SKuma.24
As you Can see in the RM0433 part 8.5.6 : "After a system reset, the HSI is selected as system clock and all PLLs are switched OFF". When you forget to call system clock configurations, a default system clock configuration is applied use the registers default parametres. You Can find more details in the reference manual of your MCU.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 9:59 AM
i am just guessing: might be, what CubeMx shows, when you start a project (and set nothing)
HSI driving core and bus...otherwise no start code/your code could start ever.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 10:06 AM - edited ‎2023-11-20 10:08 AM
Hello @SKuma.24
As you Can see in the RM0433 part 8.5.6 : "After a system reset, the HSI is selected as system clock and all PLLs are switched OFF". When you forget to call system clock configurations, a default system clock configuration is applied use the registers default parametres. You Can find more details in the reference manual of your MCU.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 10:13 AM
MCU just continues clocking from HSI or MSI clock that it start with by default, and all the AHB / APB are basically at DIV1 settings.
On H7 most will be running at 64 MHz HSI across all buses.
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
‎2023-11-20 10:16 AM
You know, you can bring up a UART and print this stuff out
void SystemDiagnostic(void)
{
printf("\n\nCore=%d, %d MHz\n", SystemCoreClock, SystemCoreClock / 1000000);
CORECheck();
IDCODECheck();
FPUCheck();
printf("APB1=%d\n", HAL_RCC_GetPCLK1Freq());
printf("APB2=%d\n", HAL_RCC_GetPCLK2Freq());
}
Up vote any posts that you find helpful, it shows what's working..
