aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/boards/EXP430FR5969/board.h
blob: 97103d3c4a9e7824f95ce08cf537a399c37a9406 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
    ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

#ifndef _BOARD_H_
#define _BOARD_H_

/*
 * Setup for the EXP430FR5969 LaunchPad board
 */

/*
 * Board identifier.
 */
#define BOARD_EXP430FR5959
#define BOARD_NAME "MSP430FR5969 LaunchPad"

/*
 * IO lines assignments.
 */
#define LINE_LED_G                                PAL_LINE(IOPORT1, 0U)
#define LINE_LED_R                                PAL_LINE(IOPORT2, 14U)
#define LINE_SW_S1                                PAL_LINE(IOPORT2, 13U)
#define LINE_SW_S2                                PAL_LINE(IOPORT1, 1U)

/*
 * I/O ports initial setup, this configuration is established soon after reset
 * in the initialization code.
 * Please refer to the MSP430X Family Users Guide for details.
 */
/*
 * Port A setup:
 * 
 * P1.0 - Green LED               (output low)
 * P1.1 - Switch S2               (input pullup)
 * P1.2 - BoosterPack BP19        (input pullup)
 * P1.3 - BoosterPack BP11        (input pullup)
 * P1.4 - BoosterPack BP12        (input pullup)
 * P1.5 - BoosterPack BP13        (input pullup)
 * P1.6 - BoosterPack BP15        (input pullup)
 * P1.7 - BoosterPack BP14        (input pullup)
 * P2.0 - Application UART TX     (alternate 2)
 * P2.1 - Application UART RX     (alternate 2)
 * P2.2 - BoosterPack BP7         (input pullup)
 * P2.3 - N/C                     (input pullup)
 * P2.4 - BoosterPack BP6         (input pullup)
 * P2.5 - BoosterPack BP4         (input pullup)
 * P2.6 - BoosterPack BP3         (input pullup)
 * P2.7 - N/C                     (input pullup)
 */
#define VAL_IOPORT1_OUT   0xFCFE
#define VAL_IOPORT1_DIR   0x0001
#define VAL_IOPORT1_REN   0xFCFE
#define VAL_IOPORT1_SEL0  0x0000
#define VAL_IOPORT1_SEL1  0x0300
#define VAL_IOPORT1_IES   0x0000
#define VAL_IOPORT1_IE    0x0000

/*
 * Port B setup:
 * 
 * P3.0 - BoosterPack BP18        (input pullup)
 * P3.1 - N/C                     (input pullup)
 * P3.2 - N/C                     (input pullup)
 * P3.3 - N/C                     (input pullup)
 * P3.4 - BoosterPack BP8         (input pullup)
 * P3.5 - BoosterPack BP9         (input pullup)
 * P3.6 - BoosterPack BP10        (input pullup)
 * P3.7 - N/C                     (input pullup)
 * P4.0 - Application UART CTS    (input pullup)
 * P4.1 - Application UART RTS    (output high)
 * P4.2 - BoosterPack BP2         (input pullup)
 * P4.3 - BoosterPack BP5         (input pullup)
 * P4.4 - N/C                     (input pullup)
 * P4.5 - Switch S1               (input pullup)
 * P4.6 - Red LED                 (output low)
 * P4.7 - N/C                     (input pullup)
 */
#define VAL_IOPORT2_OUT   0xBFFF
#define VAL_IOPORT2_DIR   0x4200
#define VAL_IOPORT2_REN   0xBDFF
#define VAL_IOPORT2_SEL0  0x0000
#define VAL_IOPORT2_SEL1  0x0000
#define VAL_IOPORT2_IES   0x0000
#define VAL_IOPORT2_IE    0x0000

/*
 * Port J setup:
 * 
 * PJ.0 - TDO                     (input pullup)
 * PJ.1 - TDI                     (input pullup)
 * PJ.2 - TMS                     (input pullup)
 * PJ.3 - TCK                     (input pullup)
 * PJ.4 - LFXIN                   (alternate 1)
 * PJ.5 - LFXOUT                  (alternate 1)
 * PJ.6 - HFXIN (N/C)             (input pullup)
 * PJ.7 - HFXOUT (N/C)            (input pullup)
 */
#define VAL_IOPORT0_OUT   0x00FF
#define VAL_IOPORT0_DIR   0x0000
#define VAL_IOPORT0_REN   0x00CF
#define VAL_IOPORT0_SEL0  0x0030
#define VAL_IOPORT0_SEL1  0x0000
#define VAL_IOPORT0_IES   0x0000
#define VAL_IOPORT0_IE    0x0000

#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
  void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */

#endif /* _BOARD_H_ */