EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Using Lowinit to speed up processor to make startup faster?

Started by one00100100 December 13, 2012
Does anyone know if it is possible to speed up startup of the MSP430F5438 chip by increasing the processor speed to 16 mHz in the Lowinit function? I am stopping the watchdog timer there but don't know if it is possible to speed up the processor.

Also, is it possible to choose not to initialize the segments here and then later in my startup code, initialize all the variables that need initialization?

I am trying to shorten the startup time so I can read in some data and erase a flash segment in less time that our capacitor discharges. Losing power while erasing causes all sorts of nasty fatal happenings.

Thanks,
Mike Raines

Beginning Microcontrollers with the MSP430

"one00100100" :

> Does anyone know if it is possible to speed up startup of the
> MSP430F5438 chip by increasing the processor speed to 16 mHz in the
> Lowinit function? I am stopping the watchdog timer there but don't know
> if it is possible to speed up the processor.
>
> Also, is it possible to choose not to initialize the segments here and
> then later in my startup code, initialize all the variables that need
> initialization?
>
> I am trying to shorten the startup time so I can read in some data and
> erase a flash segment in less time that our capacitor discharges.
> Losing power while erasing causes all sorts of nasty fatal happenings.

Sure that's all possible, you only need to set the stackpointer on start up.
In case you are not using declarations of globals like "int c;" and
initialize all your variables properly by yourself (in that case a zero data
segment is unimportant) - you can delete the segment initalisation
completely.
You have change the assembler file that the compiler is using for the init
process. (In crossworks this is crt0.asm) delete the initialisation part or
call your "specialInit()" function directly after the SP-loading:
...
; Set up stack.
mov.w #RAM_Start_Address+RAM_Size, sp
call #_specialInit
...

M.


Memfault Beyond the Launch