; generated by Component: ARM Compiler 5.06 update 4 (build 422) Tool: ArmCC [4d3604] ; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\obj\sys.o --asm_dir=.\lst\ --list_dir=.\lst\ --depend=.\obj\sys.d --cpu=Cortex-M0 --apcs=interwork -O3 --diag_suppress=9931 -I..\..\..\Library\CMSIS\Include -I..\..\..\Library\Device\Nuvoton\Mini58Series\Include -I..\..\..\Library\StdDriver\inc -I..\..\Template -I..\..\..\Library\StdDriver\driver -I.\RTE\_Template -ID:\Keil_v5\ARM\PACK\Nuvoton\NuMicro_DFP\1.0.9\Device\Mini58\Include -ID:\Keil_v5\ARM\CMSIS\Include -D__MICROLIB -D__UVISION_VERSION=523 --omf_browse=.\obj\sys.crf ..\..\..\Library\StdDriver\src\sys.c] THUMB AREA ||i.SYS_ClearResetSrc||, CODE, READONLY, ALIGN=1 SYS_ClearResetSrc PROC ;;;29 */ ;;;30 void SYS_ClearResetSrc(uint32_t u32Src) 000000 2105 MOVS r1,#5 ;;;31 { ;;;32 SYS->RSTSTS |= u32Src; 000002 0709 LSLS r1,r1,#28 000004 684a LDR r2,[r1,#4] 000006 4302 ORRS r2,r2,r0 000008 604a STR r2,[r1,#4] ;;;33 } 00000a 4770 BX lr ;;;34 ENDP AREA ||i.SYS_DisableBOD||, CODE, READONLY, ALIGN=1 SYS_DisableBOD PROC ;;;138 */ ;;;139 void SYS_DisableBOD(void) 000000 2005 MOVS r0,#5 ;;;140 { ;;;141 SYS->BODCTL &= ~SYS_BODCTL_BODEN_Msk; 000002 0700 LSLS r0,r0,#28 000004 6981 LDR r1,[r0,#0x18] 000006 0849 LSRS r1,r1,#1 000008 0049 LSLS r1,r1,#1 00000a 6181 STR r1,[r0,#0x18] ;;;142 SYS->BODCTL = (SYS->BODCTL & ~SYS_BODCTL_BODVL_Msk) | SYS_BODCTL_BODVL_Msk ; 00000c 6981 LDR r1,[r0,#0x18] 00000e 2206 MOVS r2,#6 000010 4311 ORRS r1,r1,r2 000012 6181 STR r1,[r0,#0x18] ;;;143 } 000014 4770 BX lr ;;;144 ENDP AREA ||i.SYS_EnableBOD||, CODE, READONLY, ALIGN=1 SYS_EnableBOD PROC ;;;127 */ ;;;128 void SYS_EnableBOD(int32_t i32Mode, uint32_t u32BODLevel) 000000 b510 PUSH {r4,lr} ;;;129 { ;;;130 SYS->BODCTL |= SYS_BODCTL_BODEN_Msk; 000002 2205 MOVS r2,#5 000004 0712 LSLS r2,r2,#28 000006 6993 LDR r3,[r2,#0x18] 000008 2401 MOVS r4,#1 00000a 4323 ORRS r3,r3,r4 00000c 6193 STR r3,[r2,#0x18] ;;;131 SYS->BODCTL = (SYS->BODCTL & ~SYS_BODCTL_BODRSTEN_Msk) | i32Mode; 00000e 6993 LDR r3,[r2,#0x18] 000010 2408 MOVS r4,#8 000012 43a3 BICS r3,r3,r4 000014 4303 ORRS r3,r3,r0 000016 6193 STR r3,[r2,#0x18] ;;;132 SYS->BODCTL = (SYS->BODCTL & ~SYS_BODCTL_BODVL_Msk) | u32BODLevel; 000018 6990 LDR r0,[r2,#0x18] 00001a 2306 MOVS r3,#6 00001c 4398 BICS r0,r0,r3 00001e 4308 ORRS r0,r0,r1 000020 6190 STR r0,[r2,#0x18] ;;;133 } 000022 bd10 POP {r4,pc} ;;;134 ENDP AREA ||i.SYS_GetBODStatus||, CODE, READONLY, ALIGN=1 SYS_GetBODStatus PROC ;;;40 */ ;;;41 uint32_t SYS_GetBODStatus(void) 000000 2005 MOVS r0,#5 ;;;42 { ;;;43 return (SYS->BODCTL & SYS_BODCTL_BODOUT_Msk)?1:0; 000002 0700 LSLS r0,r0,#28 000004 6980 LDR r0,[r0,#0x18] 000006 0640 LSLS r0,r0,#25 000008 0fc0 LSRS r0,r0,#31 ;;;44 } 00000a 4770 BX lr ;;;45 ENDP AREA ||i.SYS_GetResetSrc||, CODE, READONLY, ALIGN=1 SYS_GetResetSrc PROC ;;;49 */ ;;;50 uint32_t SYS_GetResetSrc(void) 000000 2005 MOVS r0,#5 ;;;51 { ;;;52 return (SYS->RSTSTS); 000002 0700 LSLS r0,r0,#28 000004 6840 LDR r0,[r0,#4] ;;;53 } 000006 4770 BX lr ;;;54 ENDP AREA ||i.SYS_IsRegLocked||, CODE, READONLY, ALIGN=2 SYS_IsRegLocked PROC ;;;59 */ ;;;60 uint32_t SYS_IsRegLocked(void) 000000 4804 LDR r0,|L6.20| ;;;61 { ;;;62 return !(SYS->REGLCTL & SYS_REGLCTL_REGLCTL_Msk); 000002 6800 LDR r0,[r0,#0] 000004 0600 LSLS r0,r0,#24 000006 0e00 LSRS r0,r0,#24 000008 d001 BEQ |L6.14| 00000a 2000 MOVS r0,#0 ;;;63 } 00000c 4770 BX lr |L6.14| 00000e 2001 MOVS r0,#1 ;62 000010 4770 BX lr ;;;64 ENDP 000012 0000 DCW 0x0000 |L6.20| DCD 0x50000100 AREA ||i.SYS_ReadPDID||, CODE, READONLY, ALIGN=1 SYS_ReadPDID PROC ;;;68 */ ;;;69 uint32_t SYS_ReadPDID(void) 000000 2005 MOVS r0,#5 ;;;70 { ;;;71 return SYS->PDID; 000002 0700 LSLS r0,r0,#28 000004 6800 LDR r0,[r0,#0] ;;;72 } 000006 4770 BX lr ;;;73 ENDP AREA ||i.SYS_ResetCPU||, CODE, READONLY, ALIGN=1 SYS_ResetCPU PROC ;;;86 */ ;;;87 void SYS_ResetCPU(void) 000000 2005 MOVS r0,#5 ;;;88 { ;;;89 SYS->IPRST0 |= SYS_IPRST0_CPURST_Msk; 000002 0700 LSLS r0,r0,#28 000004 6881 LDR r1,[r0,#8] 000006 2202 MOVS r2,#2 000008 4311 ORRS r1,r1,r2 00000a 6081 STR r1,[r0,#8] ;;;90 } 00000c 4770 BX lr ;;;91 ENDP AREA ||i.SYS_ResetChip||, CODE, READONLY, ALIGN=1 SYS_ResetChip PROC ;;;77 */ ;;;78 void SYS_ResetChip(void) 000000 2005 MOVS r0,#5 ;;;79 { ;;;80 SYS->IPRST0 |= SYS_IPRST0_CHIPRST_Msk; 000002 0700 LSLS r0,r0,#28 000004 6881 LDR r1,[r0,#8] 000006 2201 MOVS r2,#1 000008 4311 ORRS r1,r1,r2 00000a 6081 STR r1,[r0,#8] ;;;81 } 00000c 4770 BX lr ;;;82 ENDP AREA ||i.SYS_ResetModule||, CODE, READONLY, ALIGN=1 SYS_ResetModule PROC ;;;107 */ ;;;108 void SYS_ResetModule(uint32_t u32ModuleIndex) 000000 0e01 LSRS r1,r0,#24 ;;;109 { ;;;110 *(volatile uint32_t *)(&(SYS->IPRST0) + (u32ModuleIndex>>24)) |= 1<<(u32ModuleIndex & 0x00ffffff); 000002 008a LSLS r2,r1,#2 000004 2105 MOVS r1,#5 000006 0709 LSLS r1,r1,#28 000008 1851 ADDS r1,r2,r1 00000a 688b LDR r3,[r1,#8] 00000c 2201 MOVS r2,#1 00000e 4082 LSLS r2,r2,r0 000010 4313 ORRS r3,r3,r2 000012 608b STR r3,[r1,#8] ;;;111 *(volatile uint32_t *)(&(SYS->IPRST0) + (u32ModuleIndex>>24)) &= ~(1<<(u32ModuleIndex & 0x00ffffff)); 000014 6888 LDR r0,[r1,#8] 000016 4390 BICS r0,r0,r2 000018 6088 STR r0,[r1,#8] ;;;112 } 00001a 4770 BX lr ;;;113 ENDP ;*** Start embedded assembler *** #line 1 "..\\..\\..\\Library\\StdDriver\\src\\sys.c" AREA ||.rev16_text||, CODE THUMB EXPORT |__asm___5_sys_c_962b9fbe____REV16| #line 388 "..\\..\\..\\Library\\CMSIS\\Include\\cmsis_armcc.h" |__asm___5_sys_c_962b9fbe____REV16| PROC #line 389 rev16 r0, r0 bx lr ENDP AREA ||.revsh_text||, CODE THUMB EXPORT |__asm___5_sys_c_962b9fbe____REVSH| #line 402 |__asm___5_sys_c_962b9fbe____REVSH| PROC #line 403 revsh r0, r0 bx lr ENDP ;*** End embedded assembler ***