This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-MSPM0G3507: How the startup code of mspm0g3507 works.

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507, SYSCONFIG

I am using mspm0g3507 IC and when I was checking the startup code, I saw the following comment in that file.
"SystemInit can be called here, but not necessary for MSPM0".

Can someone tell me about this in some detail. 

I want to understand startup sequence code of mspm0g3507(IDE: IAR and Keil). 

file name: startup_mspm0g3507_uvision.s

Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
;IMPORT SystemInit
IMPORT __main
; SystemInit can be called here, but not necessary for MSPM0
;LDR R0, =SystemInit
;BLX R0
LDR R0, =__main
BX R0
ENDP

file name: startup_mspm0g3507_iar.c

__weak void Reset_Handler(void)
{
/* Initialize the device */
// SystemInit();

/* Call the application's entry point. */
__iar_program_start();
}

  • Hi Vivek,

    Are you wondering why the SystemInit() functions are commented out and the original purpose behind those functions?

    Is your intent to create your own startup files? In most instances there isn't a need to adjust those files.

    Regards,

    Luke

  • For the MSPM0 devices we set the interrupt handlers to their default location and that is all required from these startup files. If you wanted to set other states like CPU CLK speed, GPIOs etc. You could do that in the startup file.

    For our examples we set the rest of the device configuration using SysConfig and the SYSCFG_DL_init(); call in main.

    Regards,

    Luke

**Attention** This is a public forum