update credits
[librepilot.git] / flight / targets / boards / simposix / pios_board.h
blob23d565ef65f6acfde913e85a29f10a7d686a4daf
1 /**
2 ******************************************************************************
3 * @addtogroup OpenPilotSystem OpenPilot System
4 * @{
5 * @addtogroup OpenPilotCore OpenPilot Core
6 * @{
7 * @file pios_board.h
8 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
9 * @brief Defines board hardware for the OpenPilot Version 1.1 hardware.
10 * @see The GNU Public License (GPL) Version 3
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef PIOS_BOARD_H
30 #define PIOS_BOARD_H
33 // ------------------------
34 // Timers and Channels Used
35 // ------------------------
37 Timer | Channel 1 | Channel 2 | Channel 3 | Channel 4
38 ------+-----------+-----------+-----------+----------
39 TIM1 | | | |
40 TIM2 | --------------- PIOS_DELAY -----------------
41 TIM3 | | | |
42 TIM4 | | | |
43 TIM5 | | | |
44 TIM6 | | | |
45 TIM7 | | | |
46 TIM8 | | | |
47 ------+-----------+-----------+-----------+----------
50 // ------------------------
51 // DMA Channels Used
52 // ------------------------
53 /* Channel 1 - */
54 /* Channel 2 - SPI1 RX */
55 /* Channel 3 - SPI1 TX */
56 /* Channel 4 - SPI2 RX */
57 /* Channel 5 - SPI2 TX */
58 /* Channel 6 - */
59 /* Channel 7 - */
60 /* Channel 8 - */
61 /* Channel 9 - */
62 /* Channel 10 - */
63 /* Channel 11 - */
64 /* Channel 12 - */
66 // ------------------------
67 // BOOTLOADER_SETTINGS
68 // ------------------------
69 // #define BOARD_READABLE true
70 // #define BOARD_WRITABLE true
71 // #define MAX_DEL_RETRYS 3
74 // ------------------------
75 // PIOS_LED
76 // ------------------------
77 #define PIOS_LED_NUM 3
78 #define PIOS_LED_HEARTBEAT 0
79 #define PIOS_LED_ALARM 1
81 // ------------------------
82 // PIOS_SPI
83 // See also pios_board.c
84 // ------------------------
85 // #define PIOS_SPI_MAX_DEVS 3
87 // ------------------------
88 // PIOS_WDG
89 // ------------------------
90 #define PIOS_WATCHDOG_TIMEOUT 250
91 // #define PIOS_WDG_REGISTER RTC_BKP_DR4
92 #define PIOS_WDG_ACTUATOR 0x0001
93 #define PIOS_WDG_STABILIZATION 0x0002
94 #define PIOS_WDG_ATTITUDE 0x0004
95 #define PIOS_WDG_MANUAL 0x0008
96 #define PIOS_WDG_SENSORS 0x0010
98 // ------------------------
99 // PIOS_I2C
100 // See also pios_board.c
101 // ------------------------
102 // #define PIOS_I2C_MAX_DEVS 3
103 // extern uint32_t pios_i2c_mag_adapter_id;
104 // #define PIOS_I2C_MAIN_ADAPTER (pios_i2c_mag_adapter_id)
106 // -------------------------
107 // PIOS_USART
109 // See also pios_board.c
110 // -------------------------
111 // #define PIOS_USART_MAX_DEVS 5
113 // -------------------------
114 // PIOS_COM
116 // See also pios_board.c
117 // -------------------------
118 #define PIOS_COM_MAX_DEVS 25
119 extern uint32_t pios_com_telem_rf_id;
120 extern uint32_t pios_com_gps_id;
121 extern uint32_t pios_com_aux_id;
122 extern uint32_t pios_com_telem_usb_id;
123 extern uint32_t pios_com_bridge_id;
124 extern uint32_t pios_com_vcp_id;
125 #define PIOS_COM_AUX (pios_com_aux_id)
126 #define PIOS_COM_GPS (pios_com_gps_id)
127 #define PIOS_COM_TELEM_USB (pios_com_telem_usb_id)
128 #define PIOS_COM_TELEM_RF (pios_com_telem_rf_id)
129 #define PIOS_COM_BRIDGE (pios_com_bridge_id)
130 #define PIOS_COM_VCP (pios_com_vcp_id)
131 #define PIOS_COM_DEBUG PIOS_COM_AUX
133 // ------------------------
134 // TELEMETRY
135 // ------------------------
136 #define TELEM_QUEUE_SIZE 20
137 #define PIOS_TELEM_STACK_SIZE 624
139 #define PIOS_COM_BUFFER_SIZE 1024
140 #define PIOS_UDP_RX_BUFFER_SIZE PIOS_COM_BUFFER_SIZE
141 #define PIOS_UDP_TX_BUFFER_SIZE PIOS_COM_BUFFER_SIZE
143 // -------------------------
144 // System Settings
146 // See also System_stm32f4xx.c
147 // -------------------------
148 // These macros are deprecated
149 // please use PIOS_PERIPHERAL_APBx_CLOCK According to the table below
150 // #define PIOS_MASTER_CLOCK
151 // #define PIOS_PERIPHERAL_CLOCK
152 // #define PIOS_PERIPHERAL_CLOCK
154 #define PIOS_SYSCLK 168000000
155 // Peripherals that belongs to APB1 are:
156 // DAC |PWR |CAN1,2
157 // I2C1,2,3 |UART4,5 |USART3,2
158 // I2S3Ext |SPI3/I2S3 |SPI2/I2S2
159 // I2S2Ext |IWDG |WWDG
160 // RTC/BKP reg
161 // TIM2,3,4,5,6,7,12,13,14
163 // Calculated as SYSCLK / APBPresc * (APBPre == 1 ? 1 : 2)
164 // Default APB1 Prescaler = 4
165 // #define PIOS_PERIPHERAL_APB1_CLOCK (PIOS_SYSCLK / 2)
167 // Peripherals belonging to APB2
168 // SDIO |EXTI |SYSCFG |SPI1
169 // ADC1,2,3
170 // USART1,6
171 // TIM1,8,9,10,11
173 // Default APB2 Prescaler = 2
175 // #define PIOS_PERIPHERAL_APB2_CLOCK PIOS_SYSCLK
178 // -------------------------
179 // Interrupt Priorities
180 // -------------------------
181 // #define PIOS_IRQ_PRIO_LOW 12 // lower than RTOS
182 // #define PIOS_IRQ_PRIO_MID 8 // higher than RTOS
183 // #define PIOS_IRQ_PRIO_HIGH 5 // for SPI, ADC, I2C etc...
184 // #define PIOS_IRQ_PRIO_HIGHEST 4 // for USART etc...
186 // ------------------------
187 // PIOS_RCVR
188 // See also pios_board.c
189 // ------------------------
190 #define PIOS_RCVR_MAX_DEVS 3
191 #define PIOS_RCVR_MAX_CHANNELS 12
193 // -------------------------
194 // Receiver PPM input
195 // -------------------------
196 // #define PIOS_PPM_MAX_DEVS 1
197 // #define PIOS_PPM_NUM_INPUTS 12
199 // -------------------------
200 // Receiver PWM input
201 // -------------------------
202 // #define PIOS_PWM_MAX_DEVS 1
203 // #define PIOS_PWM_NUM_INPUTS 8
205 // -------------------------
206 // Receiver SPEKTRUM input
207 // -------------------------
208 // #define PIOS_SPEKTRUM_MAX_DEVS 2
209 // #define PIOS_SPEKTRUM_NUM_INPUTS 12
211 // -------------------------
212 // Receiver S.Bus input
213 // -------------------------
214 // #define PIOS_SBUS_MAX_DEVS 1
215 // #define PIOS_SBUS_NUM_INPUTS (16+2)
217 // -------------------------
218 // Receiver DSM input
219 // -------------------------
220 // #define PIOS_DSM_MAX_DEVS 2
221 // #define PIOS_DSM_NUM_INPUTS 12
223 // -------------------------
224 // Servo outputs
225 // -------------------------
226 // #define PIOS_SERVO_UPDATE_HZ 50
227 // #define PIOS_SERVOS_INITIAL_POSITION 0 /* dont want to start motors, have no pulse till settings loaded */
228 #define PIOS_SERVO_NUM_OUTPUTS 8
229 #define PIOS_SERVO_NUM_TIMERS PIOS_SERVO_NUM_OUTPUTS
230 // --------------------------
231 // Timer controller settings
232 // --------------------------
233 // #define PIOS_TIM_MAX_DEVS 6
235 // -------------------------
236 // ADC
237 // None.
238 // -------------------------
240 // -------------------------
241 // USB
242 // -------------------------
243 // #define PIOS_USB_MAX_DEVS 1
244 // #define PIOS_USB_ENABLED 1 /* Should remove all references to this */
245 // #define PIOS_USB_HID_MAX_DEVS 1
247 #endif /* PIOS_BOARD_H */
250 * @}
251 * @}