1 /*!
2  * \file      board-config.h
3  *
4  * \brief     Board configuration
5  *
6  * \copyright Revised BSD License, see section \ref LICENSE.
7  *
8  * \code
9  *                ______                              _
10  *               / _____)             _              | |
11  *              ( (____  _____ ____ _| |_ _____  ____| |__
12  *               \____ \| ___ |    (_   _) ___ |/ ___)  _ \
13  *               _____) ) ____| | | || |_| ____( (___| | | |
14  *              (______/|_____)_|_|_| \__)_____)\____)_| |_|
15  *              (C)2013-2017 Semtech
16  *
17  *               ___ _____ _   ___ _  _____ ___  ___  ___ ___
18  *              / __|_   _/_\ / __| |/ / __/ _ \| _ \/ __| __|
19  *              \__ \ | |/ _ \ (__| ' <| _| (_) |   / (__| _|
20  *              |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
21  *              embedded.connectivity.solutions===============
22  *
23  * \endcode
24  *
25  * \author    Miguel Luis ( Semtech )
26  *
27  * \author    Gregory Cristian ( Semtech )
28  *
29  * \author    Daniel Jaeckle ( STACKFORCE )
30  *
31  * \author    Johannes Bruder ( STACKFORCE )
32  */
33 #ifndef __BOARD_CONFIG_H__
34 #define __BOARD_CONFIG_H__
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 /*!
42  * Defines the time required for the TCXO to wakeup [ms].
43  */
44 #define BOARD_TCXO_WAKEUP_TIME                      0
45 
46 /*!
47  * Board MCU pins definitions
48  */
49 #define RADIO_RESET                                 PC_2
50 
51 #define RADIO_MOSI                                  PB_15
52 #define RADIO_MISO                                  PB_14
53 #define RADIO_SCLK                                  PB_13
54 #define RADIO_NSS                                   PB_12
55 
56 #define RADIO_DIO_0                                 PC_6
57 #define RADIO_DIO_1                                 PC_10
58 #define RADIO_DIO_2                                 PC_11
59 #define RADIO_DIO_3                                 PC_8
60 #define RADIO_DIO_4                                 PC_9
61 #define RADIO_DIO_5                                 PC_12
62 
63 #define RADIO_SWITCH_CTRL1                          PC_4
64 #define RADIO_SWITCH_CTRL2                          PC_13
65 #define RADIO_PWRAMP_CTRL                           PD_2
66 
67 #define OSC_LSE_IN                                  PC_14
68 #define OSC_LSE_OUT                                 PC_15
69 
70 #define OSC_HSE_IN                                  PH_0
71 #define OSC_HSE_OUT                                 PH_1
72 
73 #define USB_DM                                      PA_11
74 #define USB_DP                                      PA_12
75 
76 #define JTAG_TMS                                    PA_13
77 #define JTAG_TCK                                    PA_14
78 #define JTAG_TDI                                    PA_15
79 #define JTAG_TDO                                    PB_3
80 #define JTAG_NRST                                   PB_4
81 
82 #define I2C_SCL                                     PB_8
83 #define I2C_SDA                                     PB_9
84 
85 #define BAT_LEVEL_PIN_PA0                           PA_0
86 #define BAT_LEVEL_CHANNEL_PA0                       ADC_CHANNEL_0
87 
88 #define BAT_LEVEL_PIN_PA1                           PA_1
89 #define BAT_LEVEL_CHANNEL_PA1                       ADC_CHANNEL_1
90 
91 #define BOOT_1                                      PB_2
92 
93 #define GPS_POWER_ON                                PB_11
94 #define GPS_PPS                                     PC_5
95 #define GPS_UART_TX                                 PB_6
96 #define GPS_UART_RX                                 PB_7
97 
98 #define UART_TX                                     PA_2
99 #define UART_RX                                     PA_3
100 
101 #define TX_EN_SX9500                                PA_9
102 #define N_IRQ_SX9500                                PA_10
103 
104 #define IRQ_1_MMA8451                               PB_4
105 #define IRQ_2_MMA8451                               PB_4
106 
107 #define IRQ_MPL3115                                 PB_4
108 
109 #define LED_RED                                     PB_1  // Active low
110 #define LED_YELLOW                                  PB_10 // Active low
111 #define LED_GREEN                                   PC_3  // Active low
112 #define LED_USR                                     PA_5  // Active high
113 
114 #define BOARD_VERSION_PC1                           PC_1
115 #define BOARD_VERSION_PC7                           PC_7
116 
117 // Debug pins definition.
118 #define RADIO_DBG_PIN_TX                            PA_6
119 #define RADIO_DBG_PIN_RX                            PA_7
120 
121 /*!
122  * Low battery threshold definition.
123  */
124 #define LOW_BAT_THRESHOLD                           3450 // mV
125 
126 /*!
127  * LED GPIO pins objects
128  */
129 #define Led1                                        LedRed
130 #define Led2                                        LedYellow
131 #define Led3                                        LedUsr
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif // __BOARD_CONFIG_H__
138