source: asp_ewarm/asp-1.7.0/target/fs_k70f120m_EWARM2/fs_k70f120m.h@ 61

Last change on this file since 61 was 61, checked in by ertl-honda, 11 years ago

ASP for EWARM のコミット.

File size: 5.4 KB
Line 
1/*
2 * TOPPERS/JSP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Just Standard Profile Kernel
5 *
6 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 * Copyright (C) 2005-2007 by Embedded and Real-Time Systems Laboratory
9 * Graduate School of Information Science, Nagoya Univ., JAPAN
10 *
11 * ã‹L’˜ìŒ ŽÒ‚́CFree Software Foundation ‚É‚æ‚Á‚ÄŒö•\‚³‚ê‚Ä‚¢‚é
12 * GNU General Public License ‚Ì Version 2 ‚É‹Lq‚³‚ê‚Ä‚¢‚éðŒ‚©CˆÈ
13 * ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒFƒAi–{ƒ\ƒtƒgƒEƒF
14 * ƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü•ÏEÄ”z•ziˆÈ‰ºC
15 * —˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
16 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
17 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
18 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
19 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðÄ—˜—p‰Â”\‚ȃoƒCƒiƒŠƒR[ƒhiƒŠƒƒP[ƒ^ƒuƒ‹ƒIƒu
20 * ƒWƒFƒNƒgƒtƒ@ƒCƒ‹‚⃉ƒCƒuƒ‰ƒŠ‚Ȃǁj‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́C—˜—p
21 * ‚É”º‚¤ƒhƒLƒ…
22ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
23ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C
24 * ‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
25 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðÄ—˜—p•s‰Â”\‚ȃoƒCƒiƒŠƒR[ƒh‚ÌŒ`‚Ü‚½‚Í‹@Ší‚É‘g
26 * ‚ݍž‚ñ‚¾Œ`‚Å—˜—p‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±‚ƁD
27 * (a) —˜—p‚É”º‚¤ƒhƒLƒ…
28ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
29ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ì
30 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
31 * (b) —˜—p‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCã‹L’˜ìŒ ŽÒ‚É•ñ‚·‚é
32 * ‚±‚ƁD
33 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
34 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚ð–Ɛӂ·‚邱‚ƁD
35 *
36 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚́C
37 * –{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC‚»‚Ì“K—p‰Â”\«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í
38 * ‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢
39 * ‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»‚̐ӔC‚𕉂í‚È‚¢D
40 *
41 */
42#ifndef TOPPERS_CQ_STARM_H
43#define TOPPERS_CQ_STARM_H
44
45#include <sil.h>
46
47/*
48 * CORTEX-M3 CPU‚̈ˑ¶•”‚̃Cƒ“ƒNƒ‹[ƒh
49 */
50#include "arm_m_iccarm/arm_m.h"
51
52/*
53 * ƒVƒXƒeƒ€ƒNƒƒbƒN‚Ì’è‹`
54 */
55#define BUS_CLOCK (60000000)
56#define SYS_CLOCK (120000000)
57#define FLASH_CLOCK (20000000)
58#define DDR_CLOCK (150000000)
59
60/*
61 * Š„ž‚ݔԍ†‚̍őå’l
62 */
63#define TMAX_INTNO (16 + 105)
64
65/*
66 * Š„ž‚Ý—Dæ“x‚̃rƒbƒg•
67 */
68#define TBITW_IPRI 4
69
70/*
71 * Š„ž‚Ý—Dæ“xƒrƒbƒg•’†‚̃Tƒu—Dæ“x‚̃rƒbƒg•
72 */
73#define TBITW_SUBIPRI 0
74
75/*
76 * Š„ž‚݃xƒNƒ^”ԍ†’è‹`
77 */
78#define IRQ_VECTOR_USART2 (16 + 49)
79
80
81/* ƒyƒŠƒtƒFƒ‰ƒ‹ƒŒƒWƒXƒ^’è‹` */
82#define PERIPH_REG_BASE (0x40000000UL)
83#define SRAM_BASE (0x1FFF0000UL)
84
85
86#define SIM_BASE (PERIPH_REG_BASE + 0x47000)
87#define PORTA_BASE (PERIPH_REG_BASE + 0x49000)
88#define PORTE_BASE (PERIPH_REG_BASE + 0x4D000)
89#define WDOG_BASE (PERIPH_REG_BASE + 0x52000)
90#define MCG_BASE (PERIPH_REG_BASE + 0x64000)
91#define UART2_BASE (PERIPH_REG_BASE + 0x6C000)
92#define PMC_BASE (PERIPH_REG_BASE + 0x7D000)
93#define GPIOA_BASE (PERIPH_REG_BASE + 0xFF000)
94
95
96/* System Control space */
97#define SCS_BASE (0xE000E000)
98#define SYSTM_BASE (SCS_BASE + 0x0010)
99#define NVIC_BASE (SCS_BASE + 0x0100)
100#define SYSCB_BASE (SCS_BASE + 0x0D00)
101
102/* WDOG */
103#define WDOG_STCTRTLH (WDOG_BASE + 0x00)
104#define WDOG_UNLOCK (WDOG_BASE + 0x0E)
105
106/* SIM */
107#define SIM_SCGC4 (SIM_BASE + 0x1034)
108#define SIM_SCGC5 (SIM_BASE + 0x1038)
109#define SIM_CLKDIV1 (SIM_BASE + 0x1044)
110
111/* PMC */
112#define PMC_REGSC (PMC_BASE + 0x02)
113
114/* PORT_A */
115#define PORTA_PCR10 (PORTA_BASE + 0x28)
116#define PORTA_PCR11 (PORTA_BASE + 0x2C)
117#define PORTA_PCR28 (PORTA_BASE + 0x70)
118#define PORTA_PCR29 (PORTA_BASE + 0x74)
119
120/* PORT_E */
121#define PORTE_PCR16 (PORTE_BASE + 0x40)
122#define PORTE_PCR17 (PORTE_BASE + 0x44)
123
124/* GPIO_A */
125#define GPIOA_PSOR (GPIOA_BASE + 0x04)
126#define GPIOA_PCOR (GPIOA_BASE + 0x08)
127#define GPIOA_PTOR (GPIOA_BASE + 0x0C)
128#define GPIOA_PDDR (GPIOA_BASE + 0x14)
129
130/* MCG */
131#define MCG_C1 (MCG_BASE + 0x00)
132#define MCG_C2 (MCG_BASE + 0x01)
133#define MCG_C5 (MCG_BASE + 0x04)
134#define MCG_C6 (MCG_BASE + 0x05)
135#define MCG_S (MCG_BASE + 0x06)
136#define MCG_C11 (MCG_BASE + 0x10)
137#define MCG_C12 (MCG_BASE + 0x11)
138#define MCG_S2 (MCG_BASE + 0x12)
139
140/* UART2 */
141#define UART2_BDH (UART2_BASE + 0x00)
142#define UART2_BDL (UART2_BASE + 0x01)
143#define UART2_C1 (UART2_BASE +0x02)
144#define UART2_C2 (UART2_BASE + 0x03)
145#define UART2_S1 (UART2_BASE + 0x04)
146#define UART2_D (UART2_BASE + 0x07)
147#define UART2_C4 (UART2_BASE + 0x0A)
148
149/* SCB */
150#define SCB_VTOR (SYSCB_BASE + 0x08)
151#define SCB_AIRCR (SYSCB_BASE + 0x0C)
152#define SCB_SHPR3 (SYSCB_BASE + 0x20)
153
154/* NVIC */
155#define NVIC_ENAVLE_REG(ch) (NVIC_BASE + ((ch) >> 5))
156#define NVIC_DISABLE_REG(ch) (NVIC_BASE + 0x80 + ((ch) >> 5))
157#define NVIC_SET_PEND_REG(ch) (NVIC_BASE + 0x100 + ((ch) >> 5))
158#define NVIC_CLEAR_PEND_REG(ch) (NVIC_BASE + 0x180 + ((ch) >> 5))
159#define NVIC_ACTIVE_REG(ch) (NVIC_BASE + 0x200 + ((ch) >> 5))
160#define NVIC_PRIO_REG(ch) (NVIC_BASE + 0x300 + ((ch) >> 2))
161#define NVIC_STIR (NVIC_BASE+0xE00)
162
163
164#ifndef TOPPERS_MACRO_ONLY
165
166#endif /* TOPPERS_MACRO_ONLY */
167#endif /* TOPPERS_CQ_STARM_H */
Note: See TracBrowser for help on using the repository browser.