Re-Configure System Clock
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-30 11:38 PM
Posted on July 31, 2011 at 08:38
Dear all,
I have 2 applications in my STM32 microcontroller; the Boot Loader & the Main Application. It starts with the bootloader perform some actions and then it (Jumps) to a known address to execute the main application. The problem I've have is that system clock in boot loader differs from that in the main application. and when it jumps to the main application, it is executed successfully but alaways with the boot loader's clock; eventhough, I reconfigure it in the main application. My question is, how do I re-configure the system clock when I jump to the main application? Thanks in advance, Celo
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-31 5:30 AM
Posted on July 31, 2011 at 14:30
You need to make the clock setting code smarter so that it determines the current conditions and acts accordingly.
For example : Don't assume specific conditions, reset or otherwise. Don't turn on HSE if it is already running. Don't select a clock that isn't running. Turn on HSI if it has been turned off. If you are running from the PLL, you must switch to a different clock *before* reprogramming the PLL and waiting for it to relock. Then switch it back. Don't select, or wait on, clocks that already set and valid.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-31 6:25 AM
Posted on July 31, 2011 at 15:25
Actually, even if I disable PLL, HSE and HSI in the main application, it is still executed correctly using the bootloader clock !!!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-31 7:49 AM
Posted on July 31, 2011 at 16:49
Actually, even if I disable PLL, HSE and HSI in the main application, it is still executed correctly using the bootloader clock !!!
Then clearly you aren't doing those things, check your code flow.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
