2010-07-01 07:48 AM
Initializing memory C runtime
2011-05-17 04:56 AM
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.2011-05-17 04:56 AM
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.