-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NEUTRONRCF435 support including AT32F435RGT7 1M FLASH
- Loading branch information
1 parent
6ff80a4
commit 6ac6545
Showing
15 changed files
with
224 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* This file is part of Betaflight. | ||
* | ||
* Betaflight is free software. You can redistribute this software | ||
* and/or modify this software under the terms of the GNU General | ||
* Public License as published by the Free Software Foundation, | ||
* either version 3 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* Betaflight is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* | ||
* See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public | ||
* License along with this software. | ||
* | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#define FC_TARGET_MCU AT32F435G | ||
|
||
#define BOARD_NAME NEUTRONRCF435 | ||
#define MANUFACTURER_ID NERC | ||
|
||
#define LED0_PIN PC4 | ||
|
||
#define USE_GYRO | ||
#define USE_ACC | ||
#define USE_ACCGYRO_BMI270 | ||
#define GYRO_1_CS_PIN PA15 | ||
#define GYRO_1_SPI_INSTANCE SPI1 | ||
#define GYRO_1_ALIGN CW270_DEG | ||
|
||
// MPU6000 interrupts | ||
#define USE_EXTI | ||
#define USE_GYRO_EXTI | ||
#define GYRO_1_EXTI_PIN PB8 | ||
|
||
#define SPI1_SCK_PIN PA5 | ||
#define SPI2_SCK_PIN PB13 | ||
#define SPI3_SCK_PIN PB3 | ||
#define SPI1_SDI_PIN PA6 | ||
#define SPI2_SDI_PIN PB14 | ||
#define SPI3_SDI_PIN PB4 | ||
#define SPI1_SDO_PIN PA7 | ||
#define SPI2_SDO_PIN PB15 | ||
#define SPI3_SDO_PIN PB5 | ||
|
||
#define USE_FLASH | ||
#define USE_FLASH_W25Q128FV | ||
#define FLASH_CS_PIN PB9 | ||
#define FLASH_SPI_INSTANCE SPI3 | ||
|
||
#define I2C2_SCL_PIN PB10 | ||
#define I2C2_SDA_PIN PB11 | ||
|
||
#define BARO_I2C_INSTANCE I2CDEV_2 | ||
#define USE_BARO | ||
#define USE_BARO_BMP280 | ||
#define USE_BARO_DPS310 | ||
|
||
#define USE_MAX7456 | ||
#define MAX7456_SPI_INSTANCE SPI2 | ||
#define MAX7456_SPI_CS_PIN PB12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
***************************************************************************** | ||
** | ||
** File : at32_flash_f43xG.ld | ||
** | ||
** Abstract : Linker script for AT32F435/7xG Device with | ||
** 1024KByte FLASH, 384KByte RAM | ||
** | ||
** Set heap size, stack size and stack location according | ||
** to application requirements. | ||
** | ||
** Set memory bank area and size if external memory is used. | ||
** | ||
** Target : Artery Tek AT32 | ||
** | ||
** Environment : Arm gcc toolchain | ||
** | ||
***************************************************************************** | ||
*/ | ||
|
||
/* | ||
FLASH : 0x0800 0000 -- 0x083E FFFF | ||
MEM : 0x2000 0000 -- 0x2007 FFFF | ||
*/ | ||
|
||
MEMORY | ||
{ | ||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 16K | ||
FLASH_CONFIG (r) : ORIGIN = 0x08004000, LENGTH = 16K | ||
FLASH1 (rx) : ORIGIN = 0x08008000, LENGTH = 992K | ||
SYSTEM_MEMORY (rx) : ORIGIN = 0x1FFF0000, LENGTH = 16K | ||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K | ||
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K /* external ram */ | ||
} | ||
|
||
REGION_ALIAS("STACKRAM", RAM) | ||
REGION_ALIAS("VECTAB", RAM) | ||
|
||
REGION_ALIAS("MOVABLE_FLASH", FLASH1) | ||
|
||
INCLUDE "at32_flash_f4_split.ld" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* This file is part of Cleanflight and Betaflight. | ||
* | ||
* Cleanflight and Betaflight are free software. You can redistribute | ||
* this software and/or modify this software under the terms of the | ||
* GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* Cleanflight and Betaflight are distributed in the hope that they | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this software. | ||
* | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define TARGET_BOARD_IDENTIFIER "A435" | ||
|
||
#define USBD_PRODUCT_STRING "Betaflight AT32F435" | ||
|
||
#ifndef AT32F435 | ||
#define AT32F435 | ||
#endif | ||
|
||
#ifdef DEBUG | ||
// Development aid - invalid inputs or other failures are tested and will sit in a while(true) loop | ||
// so that you can go straight to the problem with the debugger | ||
#define HANG_ON_ERRORS | ||
#endif | ||
|
||
#define USE_VIRTUAL_GYRO | ||
|
||
#define USE_UART1 | ||
#define USE_UART2 | ||
#define USE_UART3 | ||
#define SERIAL_PORT_COUNT (UNIFIED_SERIAL_PORT_COUNT + 3) | ||
|
||
#define TARGET_IO_PORTA 0xffff | ||
#define TARGET_IO_PORTB 0xffff | ||
#define TARGET_IO_PORTC 0xffff | ||
#define TARGET_IO_PORTD 0xffff | ||
|
||
#define USE_SPI | ||
#define USE_SPI_DEVICE_1 | ||
#define USE_SPI_DEVICE_2 | ||
#define USE_SPI_DEVICE_3 | ||
#define USE_SPI_DMA_ENABLE_LATE | ||
|
||
#define USE_EXTI | ||
#define USE_GYRO_EXTI | ||
|
||
|
||
#define USE_I2C | ||
#define USE_I2C_DEVICE_1 | ||
#define USE_I2C_DEVICE_2 | ||
#define USE_I2C_DEVICE_3 | ||
|
||
#define USE_USB_DETECT | ||
#define USE_PERSISTENT_MSC_RTC | ||
#define USE_VCP | ||
|
||
#define UNIFIED_SERIAL_PORT_COUNT 1 | ||
|
||
#define USE_ADC | ||
|
||
#define USE_PWM_OUTPUT | ||
|
||
// Remove these undefines as support is added | ||
//#undef USE_BEEPER | ||
#undef USE_LED_STRIP | ||
#undef USE_TRANSPONDER | ||
|
||
// #undef USE_DSHOT | ||
// #undef USE_DSHOT_TELEMETRY | ||
// bitbang not implemented yet | ||
#undef USE_DSHOT_BITBANG | ||
// burst mode not implemented yet | ||
#undef USE_DSHOT_DMAR | ||
|
||
|
||
#undef USE_CAMERA_CONTROL | ||
#undef USE_RX_PPM | ||
#undef USE_RX_PWM | ||
#undef USE_RX_SPI | ||
#undef USE_RX_CC2500 | ||
#undef USE_RX_EXPRESSLRS | ||
// #undef USE_SERIAL_4WAY_BLHELI_BOOTLOADER | ||
#undef USE_SERIAL_4WAY_SK_BOOTLOADER | ||
|
||
#define FLASH_PAGE_SIZE ((uint32_t)0x0800) // 2K sectors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
TARGET_MCU := AT32F435 | ||
MCU_FLASH_SIZE := 1024 | ||
DEVICE_FLAGS = -D$(TARGET_MCU) -DAT32F435RGT7 | ||
TARGET_MCU_FAMILY := AT32F4 | ||
#error |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TARGET_MCU := AT32F435 | ||
MCU_FLASH_SIZE := 4096 | ||
DEVICE_FLAGS = -D$(TARGET_MCU) -DAT32F435ZMT7 | ||
TARGET_MCU_FAMILY := AT32F4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters