📄 main.txt
字号:
;;;129 | RCC_APB2Periph_AFIO, ENABLE);
;;;130
;;;131 /* TIM1 Periph clock enable */
;;;132 RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);
00006e 2101 MOVS r1,#1
000070 02c8 LSLS r0,r1,#11
000072 f7fffffe BL RCC_APB2PeriphClockCmd
;;;133
;;;134 /*------------------- Resources Initialization -----------------------------*/
;;;135 /* GPIO Configuration */
;;;136 GPIO_Config();
000076 f7fffffe BL GPIO_Config
;;;137
;;;138 /* Interrupt Configuration */
;;;139 InterruptConfig();
00007a f7fffffe BL InterruptConfig
;;;140
;;;141 /* Configure the systick */
;;;142 SysTick_Config();
00007e f7fffffe BL SysTick_Config
;;;143
;;;144 /*------------------- Drivers Initialization -------------------------------*/
;;;145 /* Initialize the LEDs toogling */
;;;146 // LedShow_Init();
;;;147
;;;148 /* Initialize the Low Power application */
;;;149 //LowPower_Init();
;;;150
;;;151 /* Initialize the LCD */
;;;152 STM3210E_LCD_Init();
000082 f7fffffe BL STM3210E_LCD_Init
;;;153
;;;154 /* Clear the LCD */
;;;155 LCD_Clear(White);
000086 f64f75ff MOV r5,#0xffff
00008a 4628 MOV r0,r5
00008c f7fffffe BL LCD_Clear
;;;156
;;;157 /* If HSE is not detected at program startup */
;;;158 if(HSEStartUpStatus == ERROR)
000090 7820 LDRB r0,[r4,#0] ; HSEStartUpStatus
000092 b910 CBNZ r0,|L5.154|
;;;159 {
;;;160 /* Generate NMI exception */
;;;161 NVIC_SetSystemHandlerPendingBit(SystemHandler_NMI);
000094 201f MOVS r0,#0x1f
000096 f7fffffe BL NVIC_SetSystemHandlerPendingBit
|L5.154|
;;;162 }
;;;163
;;;164 SysTick_CounterCmd(SysTick_Counter_Enable);
00009a 2001 MOVS r0,#1
00009c f7fffffe BL SysTick_CounterCmd
;;;165 SysTick_ITConfig(ENABLE);
0000a0 2001 MOVS r0,#1
0000a2 f7fffffe BL SysTick_ITConfig
;;;166 MainTask();
0000a6 f7fffffe BL MainTask
;;;167 /* Checks the availability of the bitmap files */
;;;168 CheckBitmapFilesStatus();
0000aa f7fffffe BL CheckBitmapFilesStatus
;;;169
;;;170 /* Display the STM32 introduction */
;;;171 STM32Intro();
0000ae f7fffffe BL STM32Intro
;;;172
;;;173 /* Clear the LCD */
;;;174 LCD_Clear(White);
0000b2 4628 MOV r0,r5
0000b4 f7fffffe BL LCD_Clear
;;;175
;;;176 /* Initialize the Calendar */
;;;177 Calendar_Init();
0000b8 f7fffffe BL Calendar_Init
;;;178
;;;179 /* Enable Leds toggling */
;;;180 //LedShow(ENABLE);
;;;181
;;;182 /* Initialize the Low Power application*/
;;;183 //LowPower_Init();
;;;184
;;;185 /* Set the LCD Back Color */
;;;186 LCD_SetBackColor(Blue);
0000bc 201f MOVS r0,#0x1f
0000be f7fffffe BL LCD_SetBackColor
;;;187
;;;188 /* Set the LCD Text Color */
;;;189 LCD_SetTextColor(White);
0000c2 4628 MOV r0,r5
0000c4 f7fffffe BL LCD_SetTextColor
;;;190
;;;191 /* Initialize the Menu */
;;;192 Menu_Init();
0000c8 f7fffffe BL Menu_Init
;;;193
;;;194 /* Display the main menu icons */
;;;195 ShowMenuIcons();
0000cc e8bd4070 POP {r4-r6,lr}
0000d0 f7ffbffe B.W ShowMenuIcons
;;;196 }
;;;197
ENDP
|L5.212|
DCD ||.data||
AREA ||i.GPIO_Config||, CODE, READONLY, ALIGN=2
GPIO_Config PROC
;;;357 *******************************************************************************/
;;;358 void GPIO_Config(void)
000000 b538 PUSH {r3-r5,lr}
;;;359 {
;;;360 GPIO_InitTypeDef GPIO_InitStructure;
;;;361
;;;362 /* Configure PG.07, PG.08, PG.13, PG.14 and PG.15 as input floating */
;;;363 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 ;
000002 200e MOVS r0,#0xe
000004 f8ad0000 STRH r0,[sp,#0]
;;;364 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
000008 2404 MOVS r4,#4
00000a f88d4003 STRB r4,[sp,#3]
;;;365 GPIO_Init(GPIOA, &GPIO_InitStructure);
00000e 4669 MOV r1,sp
000010 4810 LDR r0,|L6.84|
000012 f7fffffe BL GPIO_Init
;;;366
;;;367 /* Configure PD.03 as input floating */
;;;368 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_9 ;
000016 f2402003 MOV r0,#0x203
00001a f8ad0000 STRH r0,[sp,#0]
;;;369 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
00001e f88d4003 STRB r4,[sp,#3]
;;;370 GPIO_Init(GPIOB, &GPIO_InitStructure);
000022 4669 MOV r1,sp
000024 480c LDR r0,|L6.88|
000026 f7fffffe BL GPIO_Init
;;;371
;;;372 /* RIGHT Button */
;;;373 GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0);
00002a 2100 MOVS r1,#0
00002c 2001 MOVS r0,#1
00002e f7fffffe BL GPIO_EXTILineConfig
;;;374
;;;375 /* LEFT Button */
;;;376 GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource3);
000032 2103 MOVS r1,#3
000034 2000 MOVS r0,#0
000036 f7fffffe BL GPIO_EXTILineConfig
;;;377
;;;378 /* DOWN Button */
;;;379 GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource2);
00003a 2102 MOVS r1,#2
00003c 2000 MOVS r0,#0
00003e f7fffffe BL GPIO_EXTILineConfig
;;;380
;;;381 /* UP Button */
;;;382 GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource1);
000042 2101 MOVS r1,#1
000044 2000 MOVS r0,#0
000046 f7fffffe BL GPIO_EXTILineConfig
;;;383
;;;384 /* SEL Button */
;;;385 // GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource1);
;;;386
;;;387 /* KEY Button */
;;;388 GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource9);
00004a 2109 MOVS r1,#9
00004c 2001 MOVS r0,#1
00004e f7fffffe BL GPIO_EXTILineConfig
;;;389 }
000052 bd38 POP {r3-r5,pc}
;;;390
ENDP
|L6.84|
DCD 0x40010800
|L6.88|
DCD 0x40010c00
AREA ||i.Get_HSEStartUpStatus||, CODE, READONLY, ALIGN=2
Get_HSEStartUpStatus PROC
;;;598 *******************************************************************************/
;;;599 ErrorStatus Get_HSEStartUpStatus(void)
000000 4801 LDR r0,|L7.8|
;;;600 {
;;;601 return (HSEStartUpStatus);
000002 7800 LDRB r0,[r0,#0] ; HSEStartUpStatus
;;;602 }
000004 4770 BX lr
;;;603
ENDP
000006 0000 DCW 0x0000
|L7.8|
DCD ||.data||
AREA ||i.Get_LedShowStatus||, CODE, READONLY, ALIGN=2
Get_LedShowStatus PROC
;;;544 *******************************************************************************/
;;;545 u32 Get_LedShowStatus(void)
000000 4801 LDR r0,|L8.8|
;;;546 {
;;;547 return LedShowStatus;
000002 6880 LDR r0,[r0,#8] ; LedShowStatus
;;;548 }
000004 4770 BX lr
;;;549
ENDP
000006 0000 DCW 0x0000
|L8.8|
DCD ||.data||
AREA ||i.IntExtOnOffConfig||, CODE, READONLY, ALIGN=1
IntExtOnOffConfig PROC
;;;322 *******************************************************************************/
;;;323 void IntExtOnOffConfig(FunctionalState NewState)
000000 b57c PUSH {r2-r6,lr}
;;;324 {
000002 4606 MOV r6,r0
;;;325 EXTI_InitTypeDef EXTI_InitStructure;
;;;326
;;;327 /* Initializes the EXTI_InitStructure */
;;;328 EXTI_StructInit(&EXTI_InitStructure);
000004 4668 MOV r0,sp
000006 f7fffffe BL EXTI_StructInit
00000a 2400 MOVS r4,#0 ;324
;;;329
;;;330 /* Disable the EXTI line 3, 7 and 15 on falling edge */
;;;331 if(NewState == DISABLE)
;;;332 {
;;;333 EXTI_InitStructure.EXTI_Line = EXTI_Line1 | EXTI_Line2 ;//| EXTI_Line7 | EXTI_Line15;
00000c 2506 MOVS r5,#6
00000e b91e CBNZ r6,|L9.24|
;;;334 EXTI_InitStructure.EXTI_LineCmd = DISABLE;
000010 9500 STR r5,[sp,#0]
000012 f88d4006 STRB r4,[sp,#6]
;;;335 EXTI_Init(&EXTI_InitStructure);
000016 e00b B |L9.48|
|L9.24|
;;;336 }
;;;337 /* Enable the EXTI line 3, 7 and 15 on falling edge */
;;;338 else
;;;339 {
;;;340 /* Clear the the EXTI line 3, 7 and 15 interrupt pending bit */
;;;341 EXTI_ClearITPendingBit(EXTI_Line1 | EXTI_Line2 );//| EXTI_Line7 | EXTI_Line15);
000018 2006 MOVS r0,#6
00001a f7fffffe BL EXTI_ClearITPendingBit
;;;342
;;;343 EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
00001e f88d4004 STRB r4,[sp,#4]
;;;344 EXTI_InitStructure.EXTI_Line = EXTI_Line1 | EXTI_Line2;// | EXTI_Line7 | EXTI_Line15;
;;;345 EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
000022 200c MOVS r0,#0xc
000024 f88d0005 STRB r0,[sp,#5]
;;;346 EXTI_InitStructure.EXTI_LineCmd = ENABLE;
000028 2001 MOVS r0,#1
00002a 9500 STR r5,[sp,#0] ;345
00002c f88d0006 STRB r0,[sp,#6]
|L9.48|
000030 4668 MOV r0,sp ;335
000032 f7fffffe BL EXTI_Init
;;;347 EXTI_Init(&EXTI_InitStructure);
;;;348 }
;;;349 }
000036 bd7c POP {r2-r6,pc}
;;;350
ENDP
AREA ||i.InterruptConfig||, CODE, READONLY, ALIGN=2
InterruptConfig PROC
;;;204 *******************************************************************************/
;;;205 void InterruptConfig(void)
000000 b5fe PUSH {r1-r7,lr}
;;;206 {
;;;207 NVIC_InitTypeDef NVIC_InitStructure;
;;;208 EXTI_InitTypeDef EXTI_InitStructure;
;;;209
;;;210 /* Deinitializes the NVIC */
;;;211 NVIC_DeInit();
000002 f7fffffe BL NVIC_DeInit
;;;212
;;;213 /* Set the Vector Table base address at 0x08000000 */
;;;214 NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x00);
000006 2100 MOVS r1,#0
000008 f04f6000 MOV r0,#0x8000000
00000c f7fffffe BL NVIC_SetVectorTable
;;;215
;;;216 /* Configure the Priority Group to 2 bits */
;;;217 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
000010 f44f60a0 MOV r0,#0x500
000014 f7fffffe BL NVIC_PriorityGroupConfig
;;;218
;;;219 /* Configure the SysTick handler priority */
;;;220 NVIC_SystemHandlerPriorityConfig(SystemHandler_SysTick, 0, 0);
000018 2200 MOVS r2,#0
00001a 4611 MOV r1,r2
00001c 483e LDR r0,|L10.280|
00001e f7fffffe BL NVIC_SystemHandlerPriorityConfig
;;;221
;;;222 /* Enable the EXTI3 Interrupt */
;;;223 NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQChannel;
000022 2608 MOVS r6,#8
000024 f88d6008 STRB r6,[sp,#8]
;;;224 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
000028 2502 MOVS r5,#2
00002a f88d5009 STRB r5,[sp,#9]
;;;225 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
00002e 2401 MOVS r4,#1
000030 f88d400a STRB r4,[sp,#0xa]
;;;226 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
000034 f88d400b STRB r4,[sp,#0xb]
;;;227 NVIC_Init(&NVIC_InitStructure);
000038 a802 ADD r0,sp,#8
00003a f7fffffe BL NVIC_Init
;;;228
;;;229 NVIC_InitStructure.NVIC_IRQChannel = EXTI1_IRQChannel;
00003e 2007 MOVS r0,#7
000040 f88d0008 STRB r0,[sp,#8]
;;;230 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
000044 f88d5009 STRB r5,[sp,#9]
;;;231 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
000048 f88d400a STRB r4,[sp,#0xa]
;;;232 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
00004c f88d400b STRB r4,[sp,#0xb]
;;;233 NVIC_Init(&NVIC_InitStructure);
000050 a802 ADD r0,sp,#8
000052 f7fffffe BL NVIC_Init
;;;234
;;;235
;;;236 /* Enable the EXTI9_5 Interrupt */
;;;237 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
000056 2017 MOVS r0,#0x17
000058 f88d0008 STRB r0,[sp,#8]
;;;238 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
00005c f88d5009 STRB r5,[sp,#9]
;;;239 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
000060 f88d400a STRB r4,[sp,#0xa]
;;;240 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
000064 f88d400b STRB r4,[sp,#0xb]
;;;241 NVIC_Init(&NVIC_InitStructure);
000068 a802 ADD r0,sp,#8
00006a f7fffffe BL NVIC_Init
;;;242
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -