mirror of https://github.com/ARMmbed/mbed-os.git
Move SystemInit() to register unlock range for perhaps future protected register access
parent
019c989e24
commit
cc05269a57
|
@ -271,14 +271,15 @@ void Reset_Handler(void)
|
|||
/* HXT Crystal Type Select: INV */
|
||||
CLK->PWRCTL &= ~CLK_PWRCTL_HXTSELTYP_Msk;
|
||||
|
||||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
/**
|
||||
* Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
|
||||
* NOTE 1: Unlock is required for perhaps some register access in SystemInit().
|
||||
* NOTE 2: Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
|
||||
*/
|
||||
SystemInit();
|
||||
|
||||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
__main();
|
||||
|
||||
|
|
|
@ -431,14 +431,15 @@ void Reset_Handler(void)
|
|||
/* Disable Power-on Reset function */
|
||||
SYS_DISABLE_POR();
|
||||
|
||||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
/**
|
||||
* Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
|
||||
* NOTE 1: Unlock is required for perhaps some register access in SystemInit().
|
||||
* NOTE 2: Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
|
||||
*/
|
||||
SystemInit();
|
||||
|
||||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
__main();
|
||||
|
||||
|
|
Loading…
Reference in New Issue