annotate gsm-fw/L1/tpudrv/tpudrv.h @ 153:65efffcb28dc

tpudrv*.h headers imported
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 17 Nov 2013 05:10:06 +0000
parents
children 47754cdb6248
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /************* Revision Controle System Header *************
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * GSM Layer 1 software
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 *
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 * Filename tpudrv.h
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 * Copyright 2003 (C) Texas Instruments
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 *
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 ************* Revision Controle System Header *************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 * Device addresses - GCS000
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 // GSM 1.5 : TPU / TSP addresses
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 //-------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #if ((CHIPSET ==2) || (CHIPSET == 3) || (CHIPSET == 4))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #define TPU_ADDR 0xFFFE0000l // Hercule / Ulysse / Samson
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #define TPU_RAM (TPU_ADDR + 0x1400)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #define TPU_REG (TPU_ADDR + 0x1000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #define TSP_REG (TPU_ADDR + 0x0800)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #define TPU_TIM (TPU_ADDR + 0x2000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #elif ((CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #define TPU_ADDR 0xFFFF0000l // Strobe 1 address
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #define TPU_RAM 0xFFFF9000l // TPU RAM
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #define TPU_REG (TPU_ADDR + 0x1000) // TPU register
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #define TSP_REG 0xFFFE0800l // TSP register
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #define TPU_TIM 0xFFFE2000l // ULPD register
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 * Macros for defining TPU instructions
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #define TPU_SLEEP 0
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #define TPU_MOVE(addr,data) (0x8000 | ((data)<<5) | (addr))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #define TPU_AT(time) (0x2000 | (((time + 5000) % 5000)))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #define TPU_FAT(time) (0x2000 | (time)) // Fast version without modulo
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #define TPU_SYNC(time) (0x6000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #define TPU_WAIT(time) (0xA000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 #define TPU_OFFSET(time) (0x4000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #define MOD5000(a) (((a) + 5000) % 5000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 * TSP registers - defined in GCS004 - Time Serial Port
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 * in TPU address space
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 // GSM 1.5 : TSP_TX_REG_1/2/3/4 instead of TSP_TX_U/M/L
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 // added TSP_SPI_SET1/2/3 to ctrl up to 5 periph.
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 //-----------------------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #define TSP_CTRL1 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 #define TSP_CTRL2 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 #define TSP_TX_REG_1 0x04
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 #define TSP_TX_REG_2 0x03
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #define TSP_TX_REG_3 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 #define TSP_TX_REG_4 0x05
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #define TSP_ACT 0x06
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #define TSP_ACTX 0x07
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 #define TSP_GAUGING_EN 0x11
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #define TSP_SPI_SET1 0x09
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 #define TSP_SPI_SET2 0x0A
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 #define TSP_SPI_SET3 0x0B
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #define TPU_IT_DSP_PG 0x10
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #define TSP_GAUGING_EN 0x11
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 * in ARM address space - defined in HYP004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #define TSP_RX_LSB (TSP_REG + 0x00)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #define TSP_RX_MSB (TSP_REG + 0x02)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #define TSP_TX_LSB (TSP_REG + 0x0c)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #define TSP_TX_MSB (TSP_REG + 0x0a)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 * TSP registers bit definitions
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #define TC1_DEVICE0 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #define TC1_DEVICE1 0x20
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #define TC1_DEVICE2 0x40
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #define TC1_DEVICE3 0x60
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 #define TC1_DEVICE4 0x80
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 #define TC2_RD 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 #define TC2_WR 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 #define TC2_EDGE_TRIG 0x40
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #define TC2_RISING 0x80
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #define TSP_CLK_RISE 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 #define TSP_ENA_POS 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 #define TSP_ENA_EDGE 0x04
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #define GAUGING_START 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 #define GAUGING_STOP 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #define TSP_ENA_POS_MSB 0x20
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 * TPU registers - defined in HYP002
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 // GSM 1.5 : TPU reg are 16-bit access
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 //---------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 #define TPU_CTRL (TPU_REG + 0x00)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 #define TPU_INT_CTRL (TPU_REG + 0x02)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 #define TPU_INT_STAT (TPU_REG + 0x04)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #define TPU_OFFSET_REG (TPU_REG + 0x0C)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #define TPU_SYNCHRO_REG (TPU_REG + 0x0E)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #define TPU_DSP_PG (TPU_REG + 0x20)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 * TPU control register bits
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 // GSM 1.5 : TPU bits changed
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 //---------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 #define TPU_CTRL_RESET 0x0001
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 #define TSP_CTRL_RESET 0x0080
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 #define TPU_CTRL_T_PAGE 0x0002
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 #define TPU_CTRL_T_ENBL 0x0004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 #define TPU_CTRL_D_ENBL 0x0010 // WARNING THIS BIT DOES NOT EXIST IN HYPERION
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 #define TPU_CTRL_SPI_RST 0x0080
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 #define TPU_CTRL_WAIT 0x0200
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 #define TPU_CTRL_CLK_EN 0x0400
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 #if (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 #define TPU_CTRL_FULL_WRITE 0x0800
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 * TPU interrupt control register bits
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 /* WARNING BUG IN HYPERION. */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 /* READING TPU_INT_CRTL, TPU_INT_ITP_M BIT CONTENTS AFFECTS THE TPU_INT_ITD_M VALUE. */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 #define TPU_INT_ITF_M 0x0001
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 #define TPU_INT_ITP_M 0x0002
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 #define TPU_INT_ITD_M 0x0004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 #define TPU_INT_ITD_F 0x0008 // WARNING THIS BIT DOES NOT EXIST IN HYPERION
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 #define INT_FRAME 4 /* TPU frame interrupt */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 #define INT_PAGE 5 /* TPU page interrupt */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 #define INT_TSP 3 /* TSP interrupt */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 // BB signals connected to serial link1
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 #define BULON 0x80 // bit6
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 #define BULCAL 0x40 // bit5
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 #define BULENA 0x20 // bit4
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 #define BDLON 0x10 // bit3
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 #define BDLCAL 0x08 // bit2
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 #define BDLENA 0x04 // bit1
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 #define STARTADC 0x02 // bit0
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 * GSM RF programming times in quarter bits
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 /****************************** W A R N I N G !!! *************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 /******* This values are fine tuned for LAYER 1 . DO NOT MODIFY !!! *******/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 /****** FOR ANY MODIFICATION , PLEASE CONTACT Texas Instruments Inc. ******/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 /**************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 /* TPU Macros: prototypes functions */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 /**************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 // TPU macros.
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 //------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 void l1dmacro_reset_hw (UWORD32 servingCellOffset);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 void l1dmacro_init_hw (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 void l1dmacro_init_hw_light (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 void l1dmacro_idle (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 void l1dmacro_rx_synth (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 void l1dmacro_tx_synth (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 void l1dmacro_agc (SYS_UWORD16 radio_freq, WORD8 gain, UWORD8 lna);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 void l1dmacro_afc (SYS_UWORD16 afc_value, UWORD8 win_id);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 void l1dmacro_rx_ms (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 void l1dmacro_rx_fb (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 void l1dmacro_rx_fb26 (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 void l1dmacro_offset (UWORD32 offset_value,
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 WORD32 relative_time);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 void l1dmacro_synchro (UWORD32 when, UWORD32 value);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 void l1dmacro_rx_sb (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 void l1dmacro_rx_nb (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 void l1dmacro_tx_nb (SYS_UWORD16 radio_freq, UWORD8 txpwr, UWORD8 adc_active);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 void l1dmacro_tx_ra (SYS_UWORD16 radio_freq, UWORD8 txpwr, UWORD8 adc_active);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 void l1dmacro_adc_read_tx (UWORD32 when);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 void l1dmacro_adc_read_rx (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 void l1dmacro_set_frame_it (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 void l1pdmacro_it_dsp_gen(WORD16 time);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 #if TESTMODE
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 void l1dmacro_rx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 void l1dmacro_tx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 void l1dmacro_stop_cont (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221 * TPU prototypes
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 void TP_PageIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 void TP_FrameIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 void TP_PageIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 void TP_FrameIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 void TPU_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 void TSP_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 void TPU_ClkEnable(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 void TP_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 void TP_Enable(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 BOOL TPU_check_IT_DSP(void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 * TPUDRV global variables
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 #ifdef TPUDRV_C
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 #define TP_GLOBAL
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 #else
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 #define TP_GLOBAL extern
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 TP_GLOBAL volatile UWORD32 TP_PageInt;
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 TP_GLOBAL volatile UWORD32 TP_FrameInt;
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247