580 lines
20 KiB
Plaintext
580 lines
20 KiB
Plaintext
; 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\fmc.o --asm_dir=.\lst\ --list_dir=.\lst\ --depend=.\obj\fmc.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\fmc.crf ..\..\..\Library\StdDriver\src\fmc.c]
|
|
THUMB
|
|
|
|
AREA ||i.FMC_Close||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_Close PROC
|
|
;;;35 */
|
|
;;;36 void FMC_Close(void)
|
|
000000 4802 LDR r0,|L1.12|
|
|
;;;37 {
|
|
;;;38 FMC->ISPCTL &= ~FMC_ISPCTL_ISPEN_Msk;
|
|
000002 6801 LDR r1,[r0,#0]
|
|
000004 0849 LSRS r1,r1,#1
|
|
000006 0049 LSLS r1,r1,#1
|
|
000008 6001 STR r1,[r0,#0]
|
|
;;;39 }
|
|
00000a 4770 BX lr
|
|
;;;40
|
|
ENDP
|
|
|
|
|L1.12|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_Erase||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_Erase PROC
|
|
;;;47 */
|
|
;;;48 int32_t FMC_Erase(uint32_t u32PageAddr)
|
|
000000 490a LDR r1,|L2.44|
|
|
;;;49 {
|
|
;;;50 FMC->ISPCMD = FMC_ISPCMD_PAGE_ERASE;
|
|
000002 2222 MOVS r2,#0x22
|
|
000004 60ca STR r2,[r1,#0xc]
|
|
;;;51 FMC->ISPADDR = u32PageAddr;
|
|
000006 6048 STR r0,[r1,#4]
|
|
;;;52 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
000008 2001 MOVS r0,#1
|
|
00000a 6108 STR r0,[r1,#0x10]
|
|
|L2.12|
|
|
;;;53
|
|
;;;54 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000c 6908 LDR r0,[r1,#0x10]
|
|
00000e 07c0 LSLS r0,r0,#31
|
|
000010 d1fc BNE |L2.12|
|
|
;;;55
|
|
;;;56 if (FMC->ISPCTL & FMC_ISPCTL_ISPFF_Msk) {
|
|
000012 6808 LDR r0,[r1,#0]
|
|
000014 0640 LSLS r0,r0,#25
|
|
000016 d506 BPL |L2.38|
|
|
;;;57 FMC->ISPCTL |= FMC_ISPCTL_ISPFF_Msk;
|
|
000018 6808 LDR r0,[r1,#0]
|
|
00001a 2240 MOVS r2,#0x40
|
|
00001c 4310 ORRS r0,r0,r2
|
|
00001e 6008 STR r0,[r1,#0]
|
|
;;;58 return -1;
|
|
000020 2000 MOVS r0,#0
|
|
000022 43c0 MVNS r0,r0
|
|
;;;59 }
|
|
;;;60 return 0;
|
|
;;;61 }
|
|
000024 4770 BX lr
|
|
|L2.38|
|
|
000026 2000 MOVS r0,#0 ;60
|
|
000028 4770 BX lr
|
|
;;;62
|
|
ENDP
|
|
|
|
00002a 0000 DCW 0x0000
|
|
|L2.44|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_GetBootSource||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_GetBootSource PROC
|
|
;;;68 */
|
|
;;;69 int32_t FMC_GetBootSource (void)
|
|
000000 4803 LDR r0,|L3.16|
|
|
;;;70 {
|
|
;;;71 if (FMC->ISPCTL & FMC_ISPCTL_BS_Msk)
|
|
000002 6800 LDR r0,[r0,#0]
|
|
000004 0780 LSLS r0,r0,#30
|
|
000006 d501 BPL |L3.12|
|
|
;;;72 return 1;
|
|
000008 2001 MOVS r0,#1
|
|
;;;73 else
|
|
;;;74 return 0;
|
|
;;;75 }
|
|
00000a 4770 BX lr
|
|
|L3.12|
|
|
00000c 2000 MOVS r0,#0 ;74
|
|
00000e 4770 BX lr
|
|
;;;76
|
|
ENDP
|
|
|
|
|L3.16|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_GetCRC32Sum||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_GetCRC32Sum PROC
|
|
;;;270 */
|
|
;;;271 int32_t FMC_GetCRC32Sum(uint32_t addr, uint32_t count, uint32_t *chksum)
|
|
000000 b570 PUSH {r4-r6,lr}
|
|
;;;272 {
|
|
;;;273 FMC->ISPCMD = FMC_ISPCMD_CAL_CRC32;
|
|
000002 4b12 LDR r3,|L4.76|
|
|
000004 242d MOVS r4,#0x2d
|
|
000006 60dc STR r4,[r3,#0xc]
|
|
;;;274 FMC->ISPADDR = addr;
|
|
000008 6058 STR r0,[r3,#4]
|
|
;;;275 FMC->ISPDAT = count;
|
|
00000a 6099 STR r1,[r3,#8]
|
|
;;;276 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000c 2401 MOVS r4,#1
|
|
00000e 611c STR r4,[r3,#0x10]
|
|
|L4.16|
|
|
;;;277
|
|
;;;278 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
000010 6919 LDR r1,[r3,#0x10]
|
|
000012 07c9 LSLS r1,r1,#31
|
|
000014 d1fc BNE |L4.16|
|
|
;;;279
|
|
;;;280 if (FMC->ISPCTL & FMC_ISPCTL_ISPFF_Msk) {
|
|
000016 6819 LDR r1,[r3,#0]
|
|
;;;281 FMC->ISPCTL |= FMC_ISPCTL_ISPFF_Msk;
|
|
;;;282 return -1;
|
|
000018 2500 MOVS r5,#0
|
|
00001a 064e LSLS r6,r1,#25 ;280
|
|
00001c 2140 MOVS r1,#0x40 ;281
|
|
00001e 43ed MVNS r5,r5
|
|
000020 2e00 CMP r6,#0 ;280
|
|
000022 db09 BLT |L4.56|
|
|
;;;283 }
|
|
;;;284
|
|
;;;285 FMC->ISPCMD = FMC_ISPCMD_READ_CRC32;
|
|
000024 260d MOVS r6,#0xd
|
|
000026 60de STR r6,[r3,#0xc]
|
|
;;;286 FMC->ISPADDR = addr;
|
|
000028 6058 STR r0,[r3,#4]
|
|
;;;287 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00002a 611c STR r4,[r3,#0x10]
|
|
|L4.44|
|
|
;;;288
|
|
;;;289 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00002c 6918 LDR r0,[r3,#0x10]
|
|
00002e 07c0 LSLS r0,r0,#31
|
|
000030 d1fc BNE |L4.44|
|
|
;;;290
|
|
;;;291 if (FMC->ISPCTL & FMC_ISPCTL_ISPFF_Msk) {
|
|
000032 6818 LDR r0,[r3,#0]
|
|
000034 0640 LSLS r0,r0,#25
|
|
000036 d504 BPL |L4.66|
|
|
|L4.56|
|
|
;;;292 FMC->ISPCTL |= FMC_ISPCTL_ISPFF_Msk;
|
|
000038 6818 LDR r0,[r3,#0]
|
|
00003a 4308 ORRS r0,r0,r1
|
|
00003c 6018 STR r0,[r3,#0]
|
|
;;;293 return -1;
|
|
00003e 4628 MOV r0,r5
|
|
;;;294 }
|
|
;;;295
|
|
;;;296 *chksum = FMC->ISPDAT;
|
|
;;;297
|
|
;;;298 return 0;
|
|
;;;299 }
|
|
000040 bd70 POP {r4-r6,pc}
|
|
|L4.66|
|
|
000042 6898 LDR r0,[r3,#8] ;296
|
|
000044 6010 STR r0,[r2,#0] ;298
|
|
000046 2000 MOVS r0,#0 ;298
|
|
000048 bd70 POP {r4-r6,pc}
|
|
;;;300
|
|
ENDP
|
|
|
|
00004a 0000 DCW 0x0000
|
|
|L4.76|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_GetVectorPageAddr||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_GetVectorPageAddr PROC
|
|
;;;193 */
|
|
;;;194 uint32_t FMC_GetVectorPageAddr(void)
|
|
000000 4802 LDR r0,|L5.12|
|
|
;;;195 {
|
|
;;;196 return (FMC->ISPSTS & 0x0FFFFF00ul);
|
|
000002 6800 LDR r0,[r0,#0]
|
|
000004 4902 LDR r1,|L5.16|
|
|
000006 4008 ANDS r0,r0,r1
|
|
;;;197 }
|
|
000008 4770 BX lr
|
|
;;;198
|
|
ENDP
|
|
|
|
00000a 0000 DCW 0x0000
|
|
|L5.12|
|
|
DCD 0x5000c040
|
|
|L5.16|
|
|
DCD 0x0fffff00
|
|
|
|
AREA ||i.FMC_Open||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_Open PROC
|
|
;;;80 */
|
|
;;;81 void FMC_Open(void)
|
|
000000 4802 LDR r0,|L6.12|
|
|
;;;82 {
|
|
;;;83 FMC->ISPCTL |= FMC_ISPCTL_ISPEN_Msk;
|
|
000002 6801 LDR r1,[r0,#0]
|
|
000004 2201 MOVS r2,#1
|
|
000006 4311 ORRS r1,r1,r2
|
|
000008 6001 STR r1,[r0,#0]
|
|
;;;84 }
|
|
00000a 4770 BX lr
|
|
;;;85
|
|
ENDP
|
|
|
|
|L6.12|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_Read||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_Read PROC
|
|
;;;91 */
|
|
;;;92 uint32_t FMC_Read(uint32_t u32Addr)
|
|
000000 4905 LDR r1,|L7.24|
|
|
;;;93 {
|
|
;;;94 FMC->ISPCMD = FMC_ISPCMD_READ;
|
|
000002 2200 MOVS r2,#0
|
|
000004 60ca STR r2,[r1,#0xc]
|
|
;;;95 FMC->ISPADDR = u32Addr;
|
|
000006 6048 STR r0,[r1,#4]
|
|
;;;96 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
000008 2001 MOVS r0,#1
|
|
00000a 6108 STR r0,[r1,#0x10]
|
|
|L7.12|
|
|
;;;97
|
|
;;;98 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000c 6908 LDR r0,[r1,#0x10]
|
|
00000e 07c0 LSLS r0,r0,#31
|
|
000010 d1fc BNE |L7.12|
|
|
;;;99
|
|
;;;100 return FMC->ISPDAT;
|
|
000012 6888 LDR r0,[r1,#8]
|
|
;;;101 }
|
|
000014 4770 BX lr
|
|
;;;102
|
|
ENDP
|
|
|
|
000016 0000 DCW 0x0000
|
|
|L7.24|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_ReadCID||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadCID PROC
|
|
;;;107 */
|
|
;;;108 uint32_t FMC_ReadCID(void)
|
|
000000 4805 LDR r0,|L8.24|
|
|
;;;109 {
|
|
;;;110 FMC->ISPCMD = FMC_ISPCMD_READ_CID;
|
|
000002 210b MOVS r1,#0xb
|
|
000004 60c1 STR r1,[r0,#0xc]
|
|
;;;111 FMC->ISPADDR = 0x0;
|
|
000006 2100 MOVS r1,#0
|
|
000008 6041 STR r1,[r0,#4]
|
|
;;;112 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000a 2101 MOVS r1,#1
|
|
00000c 6101 STR r1,[r0,#0x10]
|
|
|L8.14|
|
|
;;;113 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000e 6901 LDR r1,[r0,#0x10]
|
|
000010 07c9 LSLS r1,r1,#31
|
|
000012 d1fc BNE |L8.14|
|
|
;;;114 return FMC->ISPDAT;
|
|
000014 6880 LDR r0,[r0,#8]
|
|
;;;115 }
|
|
000016 4770 BX lr
|
|
;;;116
|
|
ENDP
|
|
|
|
|L8.24|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_ReadConfig||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadConfig PROC
|
|
;;;223 */
|
|
;;;224 int32_t FMC_ReadConfig(uint32_t *u32Config, uint32_t u32Count)
|
|
000000 b510 PUSH {r4,lr}
|
|
;;;225 {
|
|
000002 000b MOVS r3,r1
|
|
000004 4604 MOV r4,r0
|
|
000006 d00a BEQ |L9.30|
|
|
;;;226 if (u32Count < 1)
|
|
;;;227 return 0;
|
|
;;;228
|
|
;;;229 u32Config[0] = FMC_Read(FMC_CONFIG_BASE);
|
|
000008 2003 MOVS r0,#3
|
|
00000a 0500 LSLS r0,r0,#20
|
|
00000c f7fffffe BL FMC_Read
|
|
;;;230 if (u32Count < 2)
|
|
000010 6020 STR r0,[r4,#0]
|
|
000012 2b02 CMP r3,#2
|
|
000014 d303 BCC |L9.30|
|
|
;;;231 return 0;
|
|
;;;232
|
|
;;;233 u32Config[1] = FMC_Read(FMC_CONFIG_BASE+4);
|
|
000016 4803 LDR r0,|L9.36|
|
|
000018 f7fffffe BL FMC_Read
|
|
00001c 6060 STR r0,[r4,#4]
|
|
|L9.30|
|
|
00001e 2000 MOVS r0,#0 ;231
|
|
;;;234 return 0;
|
|
;;;235 }
|
|
000020 bd10 POP {r4,pc}
|
|
;;;236
|
|
ENDP
|
|
|
|
000022 0000 DCW 0x0000
|
|
|L9.36|
|
|
DCD 0x00300004
|
|
|
|
AREA ||i.FMC_ReadDataFlashBaseAddr||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadDataFlashBaseAddr PROC
|
|
;;;169 */
|
|
;;;170 uint32_t FMC_ReadDataFlashBaseAddr(void)
|
|
000000 4801 LDR r0,|L10.8|
|
|
;;;171 {
|
|
;;;172 return FMC->DFBA;
|
|
000002 6940 LDR r0,[r0,#0x14]
|
|
;;;173 }
|
|
000004 4770 BX lr
|
|
;;;174
|
|
ENDP
|
|
|
|
000006 0000 DCW 0x0000
|
|
|L10.8|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_ReadPID||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadPID PROC
|
|
;;;121 */
|
|
;;;122 uint32_t FMC_ReadPID(void)
|
|
000000 4805 LDR r0,|L11.24|
|
|
;;;123 {
|
|
;;;124 FMC->ISPCMD = FMC_ISPCMD_READ_PID;
|
|
000002 210c MOVS r1,#0xc
|
|
000004 60c1 STR r1,[r0,#0xc]
|
|
;;;125 FMC->ISPADDR = 0x04;
|
|
000006 2104 MOVS r1,#4
|
|
000008 6041 STR r1,[r0,#4]
|
|
;;;126 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000a 2101 MOVS r1,#1
|
|
00000c 6101 STR r1,[r0,#0x10]
|
|
|L11.14|
|
|
;;;127 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000e 6901 LDR r1,[r0,#0x10]
|
|
000010 07c9 LSLS r1,r1,#31
|
|
000012 d1fc BNE |L11.14|
|
|
;;;128 return FMC->ISPDAT;
|
|
000014 6880 LDR r0,[r0,#8]
|
|
;;;129 }
|
|
000016 4770 BX lr
|
|
;;;130
|
|
ENDP
|
|
|
|
|L11.24|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_ReadUCID||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadUCID PROC
|
|
;;;136 */
|
|
;;;137 uint32_t FMC_ReadUCID(uint32_t u32Index)
|
|
000000 4906 LDR r1,|L12.28|
|
|
;;;138 {
|
|
;;;139 FMC->ISPCMD = FMC_ISPCMD_READ_UID;
|
|
000002 2204 MOVS r2,#4
|
|
000004 60ca STR r2,[r1,#0xc]
|
|
;;;140 FMC->ISPADDR = (0x04 * u32Index) + 0x10;
|
|
000006 0080 LSLS r0,r0,#2
|
|
000008 3010 ADDS r0,r0,#0x10
|
|
00000a 6048 STR r0,[r1,#4]
|
|
;;;141 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000c 2001 MOVS r0,#1
|
|
00000e 6108 STR r0,[r1,#0x10]
|
|
|L12.16|
|
|
;;;142
|
|
;;;143 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
000010 6908 LDR r0,[r1,#0x10]
|
|
000012 07c0 LSLS r0,r0,#31
|
|
000014 d1fc BNE |L12.16|
|
|
;;;144
|
|
;;;145 return FMC->ISPDAT;
|
|
000016 6888 LDR r0,[r1,#8]
|
|
;;;146 }
|
|
000018 4770 BX lr
|
|
;;;147
|
|
ENDP
|
|
|
|
00001a 0000 DCW 0x0000
|
|
|L12.28|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_ReadUID||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_ReadUID PROC
|
|
;;;153 */
|
|
;;;154 uint32_t FMC_ReadUID(uint32_t u32Index)
|
|
000000 4905 LDR r1,|L13.24|
|
|
;;;155 {
|
|
;;;156 FMC->ISPCMD = FMC_ISPCMD_READ_UID;
|
|
000002 2204 MOVS r2,#4
|
|
000004 60ca STR r2,[r1,#0xc]
|
|
;;;157 FMC->ISPADDR = 0x04 * u32Index;
|
|
000006 0080 LSLS r0,r0,#2
|
|
000008 6048 STR r0,[r1,#4]
|
|
;;;158 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000a 2001 MOVS r0,#1
|
|
00000c 6108 STR r0,[r1,#0x10]
|
|
|L13.14|
|
|
;;;159
|
|
;;;160 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000e 6908 LDR r0,[r1,#0x10]
|
|
000010 07c0 LSLS r0,r0,#31
|
|
000012 d1fc BNE |L13.14|
|
|
;;;161
|
|
;;;162 return FMC->ISPDAT;
|
|
000014 6888 LDR r0,[r1,#8]
|
|
;;;163 }
|
|
000016 4770 BX lr
|
|
;;;164
|
|
ENDP
|
|
|
|
|L13.24|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_SetVectorPageAddr||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_SetVectorPageAddr PROC
|
|
;;;180 */
|
|
;;;181 void FMC_SetVectorPageAddr(uint32_t u32PageAddr)
|
|
000000 4904 LDR r1,|L14.20|
|
|
;;;182 {
|
|
;;;183 FMC->ISPCMD = FMC_ISPCMD_VECMAP;
|
|
000002 222e MOVS r2,#0x2e
|
|
000004 60ca STR r2,[r1,#0xc]
|
|
;;;184 FMC->ISPADDR = u32PageAddr;
|
|
000006 6048 STR r0,[r1,#4]
|
|
;;;185 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
000008 2001 MOVS r0,#1
|
|
00000a 6108 STR r0,[r1,#0x10]
|
|
|L14.12|
|
|
;;;186 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000c 6908 LDR r0,[r1,#0x10]
|
|
00000e 07c0 LSLS r0,r0,#31
|
|
000010 d1fc BNE |L14.12|
|
|
;;;187 }
|
|
000012 4770 BX lr
|
|
;;;188
|
|
ENDP
|
|
|
|
|L14.20|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_Write||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_Write PROC
|
|
;;;206 */
|
|
;;;207 void FMC_Write(uint32_t u32Addr, uint32_t u32Data)
|
|
000000 4a05 LDR r2,|L15.24|
|
|
;;;208 {
|
|
;;;209 FMC->ISPCMD = FMC_ISPCMD_PROGRAM;
|
|
000002 2321 MOVS r3,#0x21
|
|
000004 60d3 STR r3,[r2,#0xc]
|
|
;;;210 FMC->ISPADDR = u32Addr;
|
|
000006 6050 STR r0,[r2,#4]
|
|
;;;211 FMC->ISPDAT = u32Data;
|
|
000008 6091 STR r1,[r2,#8]
|
|
;;;212 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
|
|
00000a 2001 MOVS r0,#1
|
|
00000c 6110 STR r0,[r2,#0x10]
|
|
|L15.14|
|
|
;;;213 while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
|
|
00000e 6910 LDR r0,[r2,#0x10]
|
|
000010 07c0 LSLS r0,r0,#31
|
|
000012 d1fc BNE |L15.14|
|
|
;;;214 }
|
|
000014 4770 BX lr
|
|
;;;215
|
|
ENDP
|
|
|
|
000016 0000 DCW 0x0000
|
|
|L15.24|
|
|
DCD 0x5000c000
|
|
|
|
AREA ||i.FMC_WriteConfig||, CODE, READONLY, ALIGN=2
|
|
|
|
FMC_WriteConfig PROC
|
|
;;;244 */
|
|
;;;245 int32_t FMC_WriteConfig(uint32_t *u32Config, uint32_t u32Count)
|
|
000000 b5f0 PUSH {r4-r7,lr}
|
|
;;;246 {
|
|
000002 000d MOVS r5,r1
|
|
000004 4606 MOV r6,r0
|
|
000006 d015 BEQ |L16.52|
|
|
;;;247 if (u32Count < 1)
|
|
;;;248 return 0;
|
|
;;;249
|
|
;;;250 FMC_ENABLE_CFG_UPDATE();
|
|
000008 4c0b LDR r4,|L16.56|
|
|
00000a 6820 LDR r0,[r4,#0]
|
|
00000c 2710 MOVS r7,#0x10
|
|
00000e 4338 ORRS r0,r0,r7
|
|
000010 6020 STR r0,[r4,#0]
|
|
;;;251 FMC_Erase(FMC_CONFIG_BASE);
|
|
000012 01a3 LSLS r3,r4,#6
|
|
000014 4618 MOV r0,r3
|
|
000016 f7fffffe BL FMC_Erase
|
|
;;;252 FMC_Write(FMC_CONFIG_BASE, u32Config[0]);
|
|
00001a 4618 MOV r0,r3
|
|
00001c 6831 LDR r1,[r6,#0]
|
|
00001e f7fffffe BL FMC_Write
|
|
;;;253
|
|
;;;254 if (u32Count < 2)
|
|
000022 2d02 CMP r5,#2
|
|
000024 d306 BCC |L16.52|
|
|
;;;255 return 0;
|
|
;;;256
|
|
;;;257 FMC_Write(FMC_CONFIG_BASE+4, u32Config[1]);
|
|
000026 4805 LDR r0,|L16.60|
|
|
000028 6871 LDR r1,[r6,#4]
|
|
00002a f7fffffe BL FMC_Write
|
|
;;;258 FMC_DISABLE_CFG_UPDATE();
|
|
00002e 6820 LDR r0,[r4,#0]
|
|
000030 43b8 BICS r0,r0,r7
|
|
000032 6020 STR r0,[r4,#0]
|
|
|L16.52|
|
|
000034 2000 MOVS r0,#0 ;255
|
|
;;;259 return 0;
|
|
;;;260 }
|
|
000036 bdf0 POP {r4-r7,pc}
|
|
;;;261
|
|
ENDP
|
|
|
|
|L16.56|
|
|
DCD 0x5000c000
|
|
|L16.60|
|
|
DCD 0x00300004
|
|
|
|
;*** Start embedded assembler ***
|
|
|
|
#line 1 "..\\..\\..\\Library\\StdDriver\\src\\fmc.c"
|
|
AREA ||.rev16_text||, CODE
|
|
THUMB
|
|
EXPORT |__asm___5_fmc_c_65c03504____REV16|
|
|
#line 388 "..\\..\\..\\Library\\CMSIS\\Include\\cmsis_armcc.h"
|
|
|__asm___5_fmc_c_65c03504____REV16| PROC
|
|
#line 389
|
|
|
|
rev16 r0, r0
|
|
bx lr
|
|
ENDP
|
|
AREA ||.revsh_text||, CODE
|
|
THUMB
|
|
EXPORT |__asm___5_fmc_c_65c03504____REVSH|
|
|
#line 402
|
|
|__asm___5_fmc_c_65c03504____REVSH| PROC
|
|
#line 403
|
|
|
|
revsh r0, r0
|
|
bx lr
|
|
ENDP
|
|
|
|
;*** End embedded assembler ***
|