File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -271,14 +271,15 @@ void Reset_Handler(void)
271
271
/* HXT Crystal Type Select: INV */
272
272
CLK -> PWRCTL &= ~CLK_PWRCTL_HXTSELTYP_Msk ;
273
273
274
- /* Enable register write-protection function */
275
- SYS_LockReg ();
276
-
277
274
/**
278
- * Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
275
+ * NOTE 1: Unlock is required for perhaps some register access in SystemInit().
276
+ * NOTE 2: Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
279
277
*/
280
278
SystemInit ();
281
279
280
+ /* Enable register write-protection function */
281
+ SYS_LockReg ();
282
+
282
283
#if defined(__CC_ARM )
283
284
__main ();
284
285
Original file line number Diff line number Diff line change @@ -431,14 +431,15 @@ void Reset_Handler(void)
431
431
/* Disable Power-on Reset function */
432
432
SYS_DISABLE_POR ();
433
433
434
- /* Enable register write-protection function */
435
- SYS_LockReg ();
436
-
437
434
/**
438
- * Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
435
+ * NOTE 1: Unlock is required for perhaps some register access in SystemInit().
436
+ * NOTE 2: Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
439
437
*/
440
438
SystemInit ();
441
439
440
+ /* Enable register write-protection function */
441
+ SYS_LockReg ();
442
+
442
443
#if defined(__CC_ARM )
443
444
__main ();
444
445
You can’t perform that action at this time.
0 commit comments