2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
21 #define TARGET_BOARD_IDENTIFIER "NOX1"
22 #define USBD_PRODUCT_STRING "NoxF4V1"
27 #define BEEPER_INVERTED
32 // *************** SPI **********************
34 #define USE_SPI_DEVICE_1
35 #define SPI1_SCK_PIN PB3
36 #define SPI1_MISO_PIN PB4
37 #define SPI1_MOSI_PIN PB5
39 #define USE_SPI_DEVICE_2
40 #define SPI2_SCK_PIN PB13
41 #define SPI2_MISO_PIN PB14
42 #define SPI2_MOSI_PIN PB15
45 // *************** SPI Gyro & ACC **********************
46 #define USE_IMU_MPU6000
47 #define IMU_MPU6000_ALIGN CW0_DEG
48 #define MPU6000_CS_PIN PB12
49 #define MPU6000_SPI_BUS BUS_SPI2
51 // *************** SPI BARO *****************************
53 #define USE_BARO_BMP280
54 #define USE_BARO_SPI_BMP280
55 #define BMP280_SPI_BUS BUS_SPI2
56 #define BMP280_CS_PIN PA9
58 // *************** SPI OSD *****************************
60 #define MAX7456_SPI_BUS BUS_SPI2
61 #define MAX7456_CS_PIN PA10
62 //#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD*2)
63 //#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
65 // *************** SPI FLASH **************************
67 #define USE_FLASH_M25P16
68 #define M25P16_CS_PIN PA15
69 #define M25P16_SPI_BUS BUS_SPI1
70 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
72 // *************** UART *****************************
73 #define USE_UART_INVERTER
78 #define UART1_TX_PIN PB6
79 #define UART1_RX_PIN PB7
82 #define UART2_TX_PIN PA2
83 #define UART2_RX_PIN PA3
85 // #define INVERTER_PIN_UART2 PC14
86 #define INVERTER_PIN_UART2_RX PC14 // PC14 used as inverter select GPIO
88 #define USE_SOFTSERIAL1
89 #define SOFTSERIAL_1_TX_PIN PA2 // Workaround for softserial not initializing with only RX
90 #define SOFTSERIAL_1_RX_PIN PA2 // Backdoor timer on UART2_TX, used for ESC telemetry
92 #define SERIAL_PORT_COUNT 4 //VCP, USART1, USART2, SOFTSERIAL1
94 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
95 #define SERIALRX_PROVIDER SERIALRX_SBUS
96 #define SERIALRX_UART SERIAL_PORT_USART2
98 // *************** ADC *****************************
100 #define ADC_INSTANCE ADC1
101 #define ADC_CHANNEL_1_PIN NONE
102 #define ADC_CHANNEL_2_PIN PA5
103 #define ADC_CHANNEL_3_PIN NONE
105 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
106 #define VBAT_ADC_CHANNEL ADC_CHN_2
107 #define RSSI_ADC_CHANNEL ADC_CHN_3
109 #define ADC_INSTANCE ADC1
110 #define ADC1_DMA_STREAM DMA2_Stream0
111 #define ADC_CHANNEL_1_PIN PA5
112 #define ADC_CHANNEL_2_PIN NONE
113 //#define ADC_CHANNEL_3_PIN PA0
114 #define VBAT_ADC_CHANNEL ADC_CHN_1
115 //#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
116 //#define RSSI_ADC_CHANNEL ADC_CHN_3
118 // *************** LED2812 ************************
119 #define USE_LED_STRIP
120 #define WS2811_PIN PA0
121 #define WS2811_DMA_HANDLER_IDENTIFER DMA2_ST1_HANDLER
122 #define WS2811_DMA_STREAM DMA2_Stream1
123 #define WS2811_DMA_CHANNEL DMA_Channel_6
125 // *************** OTHERS *************************
126 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_SOFTSERIAL | FEATURE_VBAT)
129 // #define USE_SPEKTRUM_BIND
130 // #define BIND_PIN PA10 // RX1
132 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
134 #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13)))
135 #define TARGET_IO_PORTB (0xffff & ~(BIT(2)|BIT(11)))
136 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
138 #define MAX_PWM_OUTPUT_PORTS 4