📄 main.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART 02/Aug/2006 15:41:57 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = interwork #
# Endian = little #
# Stack alignment = 4 #
# Source file = C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CAN #
# )(10K_5K)\BasicCAN-SAM7A3\src\main.c #
# Command line = "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\src\main.c" -lC #
# "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\compil\Binary\List\" -o #
# "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\compil\Binary\Obj\" -z9 #
# --debug --cpu_mode thumb --endian little --cpu #
# ARM7TDMI --stack_align 4 --interwork -e --fpu None #
# --dlib_config "D:\IAR Systems\Embedded Workbench #
# 4.0 Kickstart\arm\LIB\dl4tptinl8f.h" -I #
# "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\compil\srcIAR\" -I #
# "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\compil\..\src\" -I #
# "C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CA #
# N)(10K_5K)\BasicCAN-SAM7A3\compil\..\..\" -I #
# "D:\IAR Systems\Embedded Workbench 4.0 #
# Kickstart\arm\INC\" #
# List file = C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CAN #
# )(10K_5K)\BasicCAN-SAM7A3\compil\Binary\List\main.ls #
# t #
# Object file = C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CAN #
# )(10K_5K)\BasicCAN-SAM7A3\compil\Binary\Obj\main.r79 #
# #
# #
##############################################################################
C:\Documents and Settings\yc\桌面\AT91SAM7A3(CAN_CAN)(10K_5K)\BasicCAN-SAM7A3\src\main.c
1 //*----------------------------------------------------------------------------
2 //* ATMEL Microcontroller Software Support - ROUSSET -
3 //*----------------------------------------------------------------------------
4 //* The software is delivered "AS IS" without warranty or condition of any
5 //* kind, either express, implied or statutory. This includes without
6 //* limitation any warranty or condition with respect to merchantability or
7 //* fitness for any particular purpose, or against the infringements of
8 //* intellectual property rights of others.
9 //*----------------------------------------------------------------------------
10 //* File Name : main.c
11 //* Object : main application written in C
12 //* Creation : JPP 16/Jun/2004
13 //*----------------------------------------------------------------------------
14
15 //Include Standard files
16 #include "MCI_SD.h"
17 #include "Board.h"
\ In segment CODE, align 4, keep-with-next
\ __??Code16?? __code __interwork __atpcs void AT91F_PDC_Open(AT91PS_PDC)
\ AT91F_PDC_Open:
\ 00000000 0221 MOV R1,#+0x2
\ 00000002 0162 STR R1,[R0, #+0x20]
\ 00000004 0902 LSL R1,R1,#+0x8
\ 00000006 0162 STR R1,[R0, #+0x20]
\ 00000008 0021 MOV R1,#+0
\ 0000000A 8161 STR R1,[R0, #+0x18]
\ 0000000C C161 STR R1,[R0, #+0x1C]
\ 0000000E 0161 STR R1,[R0, #+0x10]
\ 00000010 4161 STR R1,[R0, #+0x14]
\ 00000012 8160 STR R1,[R0, #+0x8]
\ 00000014 C160 STR R1,[R0, #+0xC]
\ 00000016 0160 STR R1,[R0, #+0]
\ 00000018 4160 STR R1,[R0, #+0x4]
\ 0000001A 0121 MOV R1,#+0x1
\ 0000001C 0162 STR R1,[R0, #+0x20]
\ 0000001E 0902 LSL R1,R1,#+0x8
\ 00000020 0162 STR R1,[R0, #+0x20]
\ 00000022 7047 BX LR ;; return
18
\ In segment DATA_Z, align 4, align-sorted
19 unsigned char CMD_Responed[64] ;
\ CMD_Responed:
\ 00000000 DS8 64
\ In segment DATA_Z, align 4, align-sorted
20 CMD_Responed_Type Get_Respond_Buffer;
\ Get_Respond_Buffer:
\ 00000000 DS8 64
\ In segment DATA_Z, align 4, align-sorted
21 unsigned long int RCA_Addr ;
\ RCA_Addr:
\ 00000000 DS8 4
\ In segment DATA_Z, align 4, align-sorted
22 char *getDate ;
\ getDate:
\ 00000000 DS8 4
\ In segment DATA_Z, align 4, align-sorted
23 unsigned int ResponedType =No_Respond ;
\ ResponedType:
\ 00000000 DS8 4
24 //*************************** declare local foundations ************************
25 void DBGU_Init(void) ;
26 //*********************************** end declare ******************************
\ In segment CODE, align 4, keep-with-next
27 void main(void)
28 {
\ main:
\ 00000000 31B5 PUSH {R0,R4,R5,LR}
29
30 #ifdef OP_SD
31 int flag=0 ;
32 unsigned int GetResponed=0 ;
^
Warning[Pe550]: variable "GetResponed" was set but never used
33 DBGU_Init() ;
\ 00000002 ........ BL DBGU_Init
34 AT91F_US_SendFrame((AT91PS_USART)AT91C_BASE_DBGU,"Start init! ",15,0,0) ;
\ 00000006 304C LDR R4,??main_0 ;; `?<Constant "Start init! ">`
\ 00000008 0F22 MOV R2,#+0xF
\ 0000000A 3049 LDR R1,??main_0+0x4 ;; 0xfffff318
\ 0000000C 3048 LDR R0,??main_0+0x8 ;; 0xfffff31c
\ 0000000E 314B LDR R3,??main_0+0xC ;; 0xfffff30c
\ 00000010 1D68 LDR R5,[R3, #+0]
\ 00000012 002D CMP R5,#+0
\ 00000014 05D1 BNE ??main_1
\ 00000016 304D LDR R5,??main_0+0x10 ;; 0xfffff308
\ 00000018 2C60 STR R4,[R5, #+0]
\ 0000001A 1A60 STR R2,[R3, #+0]
\ 0000001C 0022 MOV R2,#+0
\ 0000001E 0A60 STR R2,[R1, #+0]
\ 00000020 03E0 B ??main_2
\ ??main_1:
\ 00000022 0368 LDR R3,[R0, #+0]
\ 00000024 002B CMP R3,#+0
\ 00000026 01D1 BNE ??main_3
\ 00000028 0C60 STR R4,[R1, #+0]
\ ??main_2:
\ 0000002A 0260 STR R2,[R0, #+0]
35 delay() ;
\ ??main_3:
\ 0000002C ........ _BLF delay,delay??rT
36 delay() ;
\ 00000030 ........ _BLF delay,delay??rT
37 MCI_Port_Init() ;
\ 00000034 ........ _BLF MCI_Port_Init,MCI_Port_Init??rT
\ 00000038 284D LDR R5,??main_0+0x14 ;; 0xfffac040
38
39
40 while((AT91C_BASE_MCI->MCI_SR & AT91C_MCI_CMDRDY)==0) ; //等待发送数据
\ ??main_4:
\ 0000003A 2868 LDR R0,[R5, #+0]
\ 0000003C C007 LSL R0,R0,#+0x1F
\ 0000003E FCD5 BPL ??main_4
41 MCI_Init() ;
\ 00000040 ........ _BLF MCI_Init,MCI_Init??rT
42
43 //**************要让SD卡进入MCI模式 ,好象应该让 #PIN1 =high
44 //now ,there is a OVRE and UNRE errors ,how to fix it ? write some data can clear it ????
45 //AT91C_BASE_MCI->MCI_ARGR =0x10313233 ;
46 //while((AT91C_BASE_MCI->MCI_SR & AT91C_MCI_CMDRDY)==0) ; //等待发送数据
47 //AT91C_BASE_MCI->MCI_CMDR = AT91C_MCI_TRCMD_START ;
48 //delay() ;
49 //delay() ;
50
51 while((AT91C_BASE_MCI->MCI_SR & AT91C_MCI_CMDRDY)==0) ;
\ ??main_5:
\ 00000044 2868 LDR R0,[R5, #+0]
\ 00000046 C007 LSL R0,R0,#+0x1F
\ 00000048 FCD5 BPL ??main_5
52 MCI_SendData("123456789h",0x0 ,1) ;
\ 0000004A 0122 MOV R2,#+0x1
\ 0000004C 0021 MOV R1,#+0
\ 0000004E 1034 ADD R4,#+0x10
\ 00000050 201C MOV R0,R4
\ 00000052 ........ _BLF MCI_SendData,MCI_SendData??rT
53 delay() ;
\ 00000056 ........ _BLF delay,delay??rT
54 delay() ;
\ 0000005A ........ _BLF delay,delay??rT
55
56 //***********************************************
57 SD_Init0 () ; //CMD0
\ 0000005E ........ _BLF SD_Init0,SD_Init0??rT
58 delay() ;
\ 00000062 ........ _BLF delay,delay??rT
59 while((AT91C_BASE_MCI->MCI_SR & AT91C_MCI_CMDRDY)==0) ;
\ ??main_6:
\ 00000066 2868 LDR R0,[R5, #+0]
\ 00000068 C007 LSL R0,R0,#+0x1F
\ 0000006A FCD5 BPL ??main_6
60 MCI_SendCommand(55,0x0000 ,Respond_Len_48,0) ; //RCA地址 0 ,如果是 MMC,用命令CMD1
\ 0000006C 0023 MOV R3,#+0
\ 0000006E 0122 MOV R2,#+0x1
\ 00000070 0021 MOV R1,#+0
\ 00000072 3720 MOV R0,#+0x37
\ 00000074 ........ _BLF MCI_SendCommand,MCI_SendCommand??rT
61 while((AT91C_BASE_MCI->MCI_SR & AT91C_MCI_CMDRDY)==0) ;
\ ??main_7:
\ 00000078 2868 LDR R0,[R5, #+0]
\ 0000007A C007 LSL R0,R0,#+0x1F
\ 0000007C FCD5 BPL ??main_7
62 MCI_SendCommand(41,0x00380000,Respond_Len_136,1 ) ; //设置电压范围
\ 0000007E 0123 MOV R3,#+0x1
\ 00000080 0222 MOV R2,#+0x2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -