?? wdog.lst
字號:
###############################################################################
# #
# IAR ANSI C/C++ Compiler V6.40.1.53790/W32 for ARM 09/Aug/2012 10:07:34 #
# Copyright 1999-2012 IAR Systems AB. #
# #
# Cpu mode = thumb #
# Endian = little #
# Source file = C:\Users\305030973\Desktop\M4 #
# example\01_light\src\Sources\C\Component_C\wdog.c #
# Command line = "C:\Users\305030973\Desktop\M4 #
# example\01_light\src\Sources\C\Component_C\wdog.c" -D #
# IAR -D TWR_K60N512 -lCN "C:\Users\305030973\Desktop\M4 #
# example\01_light\bin\Flash\List\" -lB #
# "C:\Users\305030973\Desktop\M4 #
# example\01_light\bin\Flash\List\" -o #
# "C:\Users\305030973\Desktop\M4 #
# example\01_light\bin\Flash\Obj\" --no_cse --no_unroll #
# --no_inline --no_code_motion --no_tbaa --no_clustering #
# --no_scheduling --debug --endian=little --cpu=Cortex-M4 #
# -e --fpu=None --dlib_config "C:\Program Files\IAR #
# Systems\Embedded Workbench 6.4_2\arm\INC\c\DLib_Config_N #
# ormal.h" -I "C:\Users\305030973\Desktop\M4 #
# example\01_light\src\Sources\H\" -I #
# "C:\Users\305030973\Desktop\M4 #
# example\01_light\src\Sources\H\Component_H\" -I #
# "C:\Users\305030973\Desktop\M4 #
# example\01_light\src\Sources\H\Frame_H\" -I "C:\Program #
# Files\IAR Systems\Embedded Workbench 6.4_2\arm\INC\" -I #
# "C:\Program Files\IAR Systems\Embedded Workbench #
# 6.4_2\arm\INC\CLIB\" -Ol --use_c++_inline #
# List file = C:\Users\305030973\Desktop\M4 #
# example\01_light\bin\Flash\List\wdog.lst #
# Object file = C:\Users\305030973\Desktop\M4 #
# example\01_light\bin\Flash\Obj\wdog.o #
# #
# #
###############################################################################
C:\Users\305030973\Desktop\M4 example\01_light\src\Sources\C\Component_C\wdog.c
1 //-------------------------------------------------------------------------*
2 // 文件名: wdog.c *
3 // 說 明: 看門狗驅動程序文件 *
4 //-------------------------------------------------------------------------*
5
6 #include "wdog.h" //包含wdog.h頭文件
7
8 //-------------------------------------------------------------------------*
9 //函數名: wdog_disable *
10 //功 能: 關閉看門狗模塊 *
11 //參 數: 無 *
12 //返 回: 無 *
13 //說 明: 無 *
14 //-------------------------------------------------------------------------*
\ In section .text, align 2, keep-with-next
15 void wdog_disable(void)
16 {
\ wdog_disable:
\ 00000000 0xB580 PUSH {R7,LR}
17 //給看門狗模塊解鎖,以便寫寄存器
18 wdog_unlock();
\ 00000002 0x.... 0x.... BL wdog_unlock
19 //關閉看門狗
20 WDOG_STCTRLH &= ~WDOG_STCTRLH_WDOGEN_MASK;
\ 00000006 0x.... LDR.N R0,??DataTable1 ;; 0x40052000
\ 00000008 0x8800 LDRH R0,[R0, #+0]
\ 0000000A 0xF64F 0x71FE MOVW R1,#+65534
\ 0000000E 0x4008 ANDS R0,R1,R0
\ 00000010 0x.... LDR.N R1,??DataTable1 ;; 0x40052000
\ 00000012 0x8008 STRH R0,[R1, #+0]
21 }
\ 00000014 0xBD01 POP {R0,PC} ;; return
22
23 //-------------------------------------------------------------------------*
24 //函數名: wdog_unlock *
25 //功 能: 看門狗解鎖 *
26 //參 數: 無 *
27 //返 回: 無 *
28 //說 明: 無 *
29 //-------------------------------------------------------------------------*
\ In section .text, align 4, keep-with-next
30 void wdog_unlock(void)
31 {
32 /* 注意: 不要單步調試此程序!!! ,否則會引起CPU復位*/
33 //關總中斷
34 DisableInterrupts;
\ wdog_unlock:
\ 00000000 0xB672 CPSID i
35 //寫解鎖寄存器
36 WDOG_UNLOCK = 0xC520;
\ 00000002 0x.... LDR.N R0,??DataTable1_1 ;; 0x4005200e
\ 00000004 0xF24C 0x5120 MOVW R1,#+50464
\ 00000008 0x8001 STRH R1,[R0, #+0]
37 //完成解鎖
38 WDOG_UNLOCK = 0xD928;
\ 0000000A 0x.... LDR.N R0,??DataTable1_1 ;; 0x4005200e
\ 0000000C 0xF64D 0x1128 MOVW R1,#+55592
\ 00000010 0x8001 STRH R1,[R0, #+0]
39 //開總中斷
40 EnableInterrupts;
\ 00000012 0xB662 CPSIE i
41 }
\ 00000014 0x4770 BX LR ;; return
\ In section .text, align 4, keep-with-next
\ ??DataTable1:
\ 00000000 0x40052000 DC32 0x40052000
\ In section .text, align 4, keep-with-next
\ ??DataTable1_1:
\ 00000000 0x4005200E DC32 0x4005200e
Maximum stack usage in bytes:
.cstack Function
------- --------
8 wdog_disable
8 -> wdog_unlock
0 wdog_unlock
Section sizes:
Bytes Function/Label
----- --------------
4 ??DataTable1
4 ??DataTable1_1
22 wdog_disable
22 wdog_unlock
52 bytes in section .text
52 bytes of CODE memory
Errors: none
Warnings: none
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -