Initializing memory C runtime
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-07-01 7:48 AM
Posted on July 01, 2010 at 16:48
Initializing memory C runtime
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:56 AM
Posted on May 17, 2011 at 13:56
Yes.
In my project I modified the startup code to immediately crank up the clock speed to 72 MHZ. Another thing I do before the variable initialization is a RAM integrity test. By doing the test before variable initialization and ensuring that I'm only using registers, I can get complete coverage in my RAM test. Of course this test also happens after I have bumped up the clock speed.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:56 AM
Posted on May 17, 2011 at 13:56
Fastest way should be:
1. configure and enable HSE/PLL 2. start copying/initializing 3. interrupt on HSERDY/PLLRDY and in this interrupt you will switch to HSE/PLL 4. continue step 2 5. Only wait for HSERDY/PLLRDY, if you really need it (for MCO or timers i.e)! HSE and PLL startup are very slow (HSE typ. ~2ms). With dumb assembler code you can initialize about 18k of RAM in 2ms to zero (28% of 64k RAM) or 13k of RAM as copy from flash (20% of 64k RAM) ;) Most programs doesn't need more initialized memory.