⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hw_config.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 2 页
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\hw_config.o --depend=.\Obj\hw_config.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\source\hw_config.c]
                          THUMB

                          AREA ||i.Enter_LowPowerMode||, CODE, READONLY, ALIGN=2

                  Enter_LowPowerMode PROC
;;;74     *******************************************************************************/
;;;75     void Enter_LowPowerMode(void)
000000  4901              LDR      r1,|L1.8|
;;;76     {
;;;77       /* Set the device state to suspend */
;;;78       bDeviceState = SUSPENDED;
000002  2003              MOVS     r0,#3
000004  6008              STR      r0,[r1,#0]  ; bDeviceState
;;;79     }
000006  4770              BX       lr
;;;80     
                          ENDP

                  |L1.8|
                          DCD      bDeviceState

                          AREA ||i.Get_SerialNum||, CODE, READONLY, ALIGN=2

                  Get_SerialNum PROC
;;;236    *******************************************************************************/
;;;237    void Get_SerialNum(void)
000000  b510              PUSH     {r4,lr}
;;;238    {
000002  480e              LDR      r0,|L2.60|
;;;239      u32 Device_Serial0, Device_Serial1, Device_Serial2;
;;;240    
;;;241      Device_Serial0 = *(vu32*)(0x1FFFF7E8);
000004  6801              LDR      r1,[r0,#0]
;;;242      Device_Serial1 = *(vu32*)(0x1FFFF7EC);
000006  6842              LDR      r2,[r0,#4]
;;;243      Device_Serial2 = *(vu32*)(0x1FFFF7F0);
000008  6883              LDR      r3,[r0,#8]
;;;244    
;;;245      if (Device_Serial0 != 0)
00000a  2900              CMP      r1,#0
00000c  d015              BEQ      |L2.58|
;;;246      {
;;;247        MASS_StringSerial[2] = (u8)(Device_Serial0 & 0x000000FF);
00000e  480c              LDR      r0,|L2.64|
;;;248        MASS_StringSerial[4] = (u8)((Device_Serial0 & 0x0000FF00) >> 8);
000010  0a0c              LSRS     r4,r1,#8
000012  7081              STRB     r1,[r0,#2]            ;247
000014  7104              STRB     r4,[r0,#4]
;;;249        MASS_StringSerial[6] = (u8)((Device_Serial0 & 0x00FF0000) >> 16);
000016  0c0c              LSRS     r4,r1,#16
000018  7184              STRB     r4,[r0,#6]
;;;250        MASS_StringSerial[8] = (u8)((Device_Serial0 & 0xFF000000) >> 24);
00001a  0e09              LSRS     r1,r1,#24
00001c  7201              STRB     r1,[r0,#8]
;;;251    
;;;252        MASS_StringSerial[10] = (u8)(Device_Serial1 & 0x000000FF);
00001e  7282              STRB     r2,[r0,#0xa]
;;;253        MASS_StringSerial[12] = (u8)((Device_Serial1 & 0x0000FF00) >> 8);
000020  0a11              LSRS     r1,r2,#8
000022  7301              STRB     r1,[r0,#0xc]
;;;254        MASS_StringSerial[14] = (u8)((Device_Serial1 & 0x00FF0000) >> 16);
000024  0c11              LSRS     r1,r2,#16
000026  7381              STRB     r1,[r0,#0xe]
;;;255        MASS_StringSerial[16] = (u8)((Device_Serial1 & 0xFF000000) >> 24);
000028  0e11              LSRS     r1,r2,#24
00002a  7401              STRB     r1,[r0,#0x10]
;;;256    
;;;257        MASS_StringSerial[18] = (u8)(Device_Serial2 & 0x000000FF);
00002c  7483              STRB     r3,[r0,#0x12]
;;;258        MASS_StringSerial[20] = (u8)((Device_Serial2 & 0x0000FF00) >> 8);
00002e  0a19              LSRS     r1,r3,#8
000030  7501              STRB     r1,[r0,#0x14]
;;;259        MASS_StringSerial[22] = (u8)((Device_Serial2 & 0x00FF0000) >> 16);
000032  0c19              LSRS     r1,r3,#16
000034  7581              STRB     r1,[r0,#0x16]
;;;260        MASS_StringSerial[24] = (u8)((Device_Serial2 & 0xFF000000) >> 24);
000036  0e19              LSRS     r1,r3,#24
000038  7601              STRB     r1,[r0,#0x18]
                  |L2.58|
;;;261      }
;;;262    }
00003a  bd10              POP      {r4,pc}
;;;263    
                          ENDP

                  |L2.60|
                          DCD      0x1ffff7e8
                  |L2.64|
                          DCD      MASS_StringSerial

                          AREA ||i.Leave_LowPowerMode||, CODE, READONLY, ALIGN=2

                  Leave_LowPowerMode PROC
;;;86     *******************************************************************************/
;;;87     void Leave_LowPowerMode(void)
000000  4804              LDR      r0,|L3.20|
;;;88     {
;;;89       DEVICE_INFO *pInfo = &Device_Info;
;;;90     
;;;91       /* Set the device state to the correct state */
;;;92       if (pInfo->Current_Configuration != 0)
000002  7a81              LDRB     r1,[r0,#0xa]
;;;93       {
;;;94         /* Device configured */
;;;95         bDeviceState = CONFIGURED;
000004  4804              LDR      r0,|L3.24|
000006  b109              CBZ      r1,|L3.12|
000008  2105              MOVS     r1,#5
00000a  e000              B        |L3.14|
                  |L3.12|
;;;96       }
;;;97       else
;;;98       {
;;;99         bDeviceState = ATTACHED;
00000c  2101              MOVS     r1,#1
                  |L3.14|
00000e  6001              STR      r1,[r0,#0]            ;95  ; bDeviceState
;;;100      }
;;;101    
;;;102    }
000010  4770              BX       lr
;;;103    
                          ENDP

000012  0000              DCW      0x0000
                  |L3.20|
                          DCD      Device_Info
                  |L3.24|
                          DCD      bDeviceState

                          AREA ||i.Led_Config||, CODE, READONLY, ALIGN=2

                  Led_Config PROC
;;;150    *******************************************************************************/
;;;151    void Led_Config(void)
000000  b508              PUSH     {r3,lr}
;;;152    {
;;;153      GPIO_InitTypeDef GPIO_InitStructure;
;;;154    
;;;155      /* Enable USB_LED_PORT clock */
;;;156      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIO_LED, ENABLE);
000002  2101              MOVS     r1,#1
000004  2080              MOVS     r0,#0x80
000006  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;157    
;;;158      /* Configure USB_LED_PORT pin6, pin7, pin8 and pin9 as output push-pull */
;;;159      GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8;
00000a  f44f70e0          MOV      r0,#0x1c0
00000e  f8ad0000          STRH     r0,[sp,#0]
;;;160      GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
000012  2010              MOVS     r0,#0x10
000014  f88d0003          STRB     r0,[sp,#3]
;;;161      GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
000018  2003              MOVS     r0,#3
00001a  f88d0002          STRB     r0,[sp,#2]
;;;162      GPIO_Init(USB_LED_PORT, &GPIO_InitStructure);
00001e  4669              MOV      r1,sp
000020  4801              LDR      r0,|L4.40|
000022  f7fffffe          BL       GPIO_Init
;;;163    }
000026  bd08              POP      {r3,pc}
;;;164    
                          ENDP

                  |L4.40|
                          DCD      0x40011c00

                          AREA ||i.Led_RW_OFF||, CODE, READONLY, ALIGN=2

                  Led_RW_OFF PROC
;;;183    *******************************************************************************/
;;;184    void Led_RW_OFF(void)
000000  f44f7180          MOV      r1,#0x100
;;;185    {
;;;186      GPIO_ResetBits(USB_LED_PORT, GPIO_Pin_8);
000004  4801              LDR      r0,|L5.12|
000006  f7ffbffe          B.W      GPIO_ResetBits
;;;187    }
;;;188    /*******************************************************************************
                          ENDP

00000a  0000              DCW      0x0000
                  |L5.12|
                          DCD      0x40011c00

                          AREA ||i.Led_RW_ON||, CODE, READONLY, ALIGN=2

                  Led_RW_ON PROC
;;;171    *******************************************************************************/
;;;172    void Led_RW_ON(void)
000000  f44f7180          MOV      r1,#0x100
;;;173    {
;;;174      GPIO_SetBits(USB_LED_PORT, GPIO_Pin_8);
000004  4801              LDR      r0,|L6.12|
000006  f7ffbffe          B.W      GPIO_SetBits
;;;175    }
;;;176    
                          ENDP

00000a  0000              DCW      0x0000
                  |L6.12|
                          DCD      0x40011c00

                          AREA ||i.MAL_Config||, CODE, READONLY, ALIGN=1

                  MAL_Config PROC
;;;326    *******************************************************************************/
;;;327    void MAL_Config(void)
000000  b510              PUSH     {r4,lr}
;;;328    {
;;;329      MAL_Init(0);
000002  2000              MOVS     r0,#0
000004  f7fffffe          BL       MAL_Init
;;;330    
;;;331      /* Enable the FSMC Clock */
;;;332      RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
000008  2101              MOVS     r1,#1
00000a  0208              LSLS     r0,r1,#8
00000c  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;333      MAL_Init(1);
000010  e8bd4010          POP      {r4,lr}
000014  2001              MOVS     r0,#1
000016  f7ffbffe          B.W      MAL_Init
;;;334    }
;;;335    
                          ENDP


                          AREA ||i.RCC_Config||, CODE, READONLY, ALIGN=2

                  RCC_Config PROC
;;;269    *******************************************************************************/
;;;270    static void RCC_Config(void)
000000  b510              PUSH     {r4,lr}
;;;271    {
;;;272    
;;;273      /* RCC system reset(for debug purpose) */
;;;274      RCC_DeInit();
000002  f7fffffe          BL       RCC_DeInit
;;;275    
;;;276      /* Enable HSE */
;;;277      RCC_HSEConfig(RCC_HSE_ON);
000006  f44f3480          MOV      r4,#0x10000
00000a  4620              MOV      r0,r4
00000c  f7fffffe          BL       RCC_HSEConfig
;;;278    
;;;279      /* Wait till HSE is ready */
;;;280      HSEStartUpStatus = RCC_WaitForHSEStartUp();
000010  f7fffffe          BL       RCC_WaitForHSEStartUp
000014  4916              LDR      r1,|L8.112|
000016  7008              STRB     r0,[r1,#0]
;;;281    
;;;282      if (HSEStartUpStatus == SUCCESS)
000018  b2c0              UXTB     r0,r0
00001a  2801              CMP      r0,#1
00001c  d126              BNE      |L8.108|
;;;283      {
;;;284        /* Enable Prefetch Buffer */
;;;285        FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
00001e  2010              MOVS     r0,#0x10
000020  f7fffffe          BL       FLASH_PrefetchBufferCmd
;;;286    
;;;287        /* Flash 2 wait state */
;;;288        FLASH_SetLatency(FLASH_Latency_2);
000024  2002              MOVS     r0,#2
000026  f7fffffe          BL       FLASH_SetLatency
;;;289    
;;;290        /* HCLK = SYSCLK */
;;;291        RCC_HCLKConfig(RCC_SYSCLK_Div1);
00002a  2000              MOVS     r0,#0
00002c  f7fffffe          BL       RCC_HCLKConfig
;;;292    
;;;293        /* PCLK2 = HCLK */
;;;294        RCC_PCLK2Config(RCC_HCLK_Div1);
000030  2000              MOVS     r0,#0
000032  f7fffffe          BL       RCC_PCLK2Config

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -