📄 main.lst
字号:
###############################################################################
# #
# 25/May/2009 03:31:57 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM #
# Copyright 1999-2008 IAR Systems AB. #
# #
# Cpu mode = arm #
# Endian = little #
# Source file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\main.c #
# Command line = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\main.c #
# -D at91sam7x256 -D flash -D TRACE_LEVEL=4 -lC #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\ --remarks --diag_suppress #
# Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
# 4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
# started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
# d-project\ewp\at91sam7x256_flash\Obj\ --no_cse #
# --no_unroll --no_inline --no_code_motion --no_tbaa #
# --no_clustering --no_scheduling --debug --endian=little #
# --cpu=ARM7TDMI -e --fpu=None --dlib_config "C:\Program #
# Files (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\DLib_Config_Full.h" -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/peripherals\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
# 25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
# ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
# rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/components\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/boards/at91sam7x-ek\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\external_libs/crc\ -I "C:\Program Files #
# (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh #
# List file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\main.lst #
# Object file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\Obj\main.o #
# #
# #
###############################################################################
F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\getting-started-project\main.c
1 /*
2
3 ###################################################
4 ###################################################
5 ###################################################
6 ###################################################
7 ###################################################
8 ###################################################
9 ###################################################
10 ################
11 ################ ################ #################
12 ################ ################ #################
13 ################ ################ #################
14 ################ ################ #################
15 ################ ################ #################
16 ################ ################ #################
17 ################ ################ #################
18 ################ ################ #################
19 ################ ################ #################
20 ################ #################
21 ###################################################
22 ###################################################
23 #################################################
24 ###############################################
25 ##########################################
26 #####################################
27 ###############################
28 #######################
29 *-----------------------------------------------------------------------------
30 * Zberac dat CAN zbernice - diplomova praca Jozef Hegedus
31 *-----------------------------------------------------------------------------
32 *
33 * Vytvorene s pouzitim kniznic dodanych firmou Atmel Corporation spolocne
34 * s vyvojovym kitom AT91SAM7X-EK pre KEMT - FEI TUKE.
35 *
36 *-----------------------------------------------------------------------------
37 *
38 * nastavenia hyperterminal
39 * 115200 baudov
40 * 8 bitov
41 * ziadna parita [No parity]
42 * 1 stop bit
43 * ziadne riadenie toku [No flow control]
44 */
45 //-----------------------------------------------------------------------------
46 // kniznice
47 //-----------------------------------------------------------------------------
48
49 #include <board.h>
50 #include <pio/pio.h>
51 #include <pio/pio_it.h>
52 #include <pit/pit.h>
53 #include <aic/aic.h>
54 #include <tc/tc.h>
55 #include <pwmc/pwmc.h>
56 #include <utility/led.h>
57 #include <utility/trace.h>
58 #include <utility/assert.h>
59 #include <can/can.h>
60 #include <dbgu/dbgu.h>
61 #include <rtt/rtt.h>
62 #include <sdmmc_spi.h>
63 #include <sdspi.h>
64 #include <utility/trace.h>
65 #include <stdio.h>
66 #include <string.h>
67
68 //------------------------------------------------------------------------------
69 // Lokalne premenne
70 //------------------------------------------------------------------------------
71 #ifndef AT91C_ID_TC0
72 #if defined(AT91C_ID_TC012)
73 #define AT91C_ID_TC0 AT91C_ID_TC012
74 #elif defined(AT91C_ID_TC)
75 #define AT91C_ID_TC0 AT91C_ID_TC
76 #else
77 #error Pb define ID_TC
78 #endif
79 #endif
80
81 /// Delay for pushbutton debouncing (in milliseconds).
82 #define DEBOUNCE_TIME 500
83
84 /// PIT period value in 祍econds.
85 #define PIT_PERIOD 1000
86 /// PWM frequency in Hz.
87 #define PWM_FREQUENCY 20000
88
89 /// Maximum duty cycle value.
90 #define MAX_DUTY_CYCLE 50
91
92 /// Minimum duty cycle value (cannot be 0 or 1 for the SAM7S, c.f. errata)
93
94 #define MIN_DUTY_CYCLE 0
\ In section .bss, align 4
95 CanTransfer canTransfer1;
\ canTransfer1:
\ 00000000 DS8 36
96
\ In section .bss, align 1
97 unsigned char StopSW = 0;
\ StopSW:
\ 00000000 DS8 1
98
99 /// Pushbutton \#1 pin instance.
\ In section .rodata, align 4
100 const Pin pinPB1 = PIN_PUSHBUTTON_1;
\ pinPB1:
\ 00000000 0000800000F4 DC32 8388608, 0FFFFF400H
\ FFFF
\ 00000008 02020300 DC8 2, 2, 3, 0
101
102 /// Pio pins na konfiguraciu
\ In section .rodata, align 4
103 static const Pin pins[] = {
\ pins:
\ 00000000 0000001800F4 DC32 402653184, 0FFFFF400H
\ FFFF
\ 00000008 02000000 DC8 2, 0, 0, 0
\ 0000000C 0000100000F6 DC32 1048576, 0FFFFF600H
\ FFFF
\ 00000014 03000000 DC8 3, 0, 0, 0
104 PINS_DBGU,
105 PIN_PWM_LED0
106 };
107
108 /// Global timestamp in milliseconds since start of application.
\ In section .bss, align 4
109 volatile unsigned int timestamp = 0;
\ timestamp:
\ 00000000 DS8 4
110
111 /// SPI driver instance.
\ In section .bss, align 4
112 static SdSpi sdSpiDrv;
\ sdSpiDrv:
\ 00000000 DS8 16
113
114 /// SDCard driver instance.
\ In section .bss, align 4
115 static SdCard sdDrv;
\ sdDrv:
\ 00000000 DS8 84
116
117 /// SD card pins.
\ In section .rodata, align 4
118 static const Pin pinsSd[] = {BOARD_SD_SPI_PINS};
\ pinsSd:
\ 00000000 0000010000F4 DC32 65536, 0FFFFF400H
\ FFFF
\ 00000008 02000000 DC8 2, 0, 0, 0
\ 0000000C 0000020000F4 DC32 131072, 0FFFFF400H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -