STM32 Quadcopter Flight Controller as Development Board?

I'm trying to figure out if those fast quadcopter flight controllers with STM32 chips on the market can be programmed with arduino IDE.

Since I've never got any of those flight controllers in my hands nor seen any, I don't know much of those boards. And I couldn't find any examples on the internet. People just seem to load popular firmware to these dedicated flight controllers, using suites, via USB.

My motive is that I've made a working multirotor flight controller from scratch, on a Arduino Nano. I may need a better and more compact hardware for future projects. So I'm looking into these STM32 flight controllers.

I'd like to get answers from those who worked with STM32 quadcopter flight controllers. Is it possible to move my scratch built flight control firmware from Arduino Nano to a high speed STM32F403 flight controller?

Hi CCCanyon,

There's the STM32Duino project that brings Arduino compatibility to STM32 microcontrollers: GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino.

However the supported hardware is aimed at STM32 development boards rather than flight controllers.

An easier solution might be to consider an Arduino compatible board such as Adafruit's Itsy Bitsy M4 or Feather M4. The Itsy Bitsy M4 in particular is smaller than the Arduino Nano, but has a 120MHz, SAMD51 ARM Cortex M4F with a single precision floating point unit (FPU), 512K flash, 192K RAM and compared to the Nano is unbelievably fast.

Also, to maximise the performance of the microcontroller, it's preferable to communicate with the gyroscope/accelerometer device over SPI rather than I2C.

The main disadvantage of Microchip's (formerly Atmel) SAMD51 when compared to the STM microcontrollers is that its pins are not 5V tolerant. However, while RC receivers are powered by 5V, they output 3.3V, so for a simple flight controller this normally isn't an issue.

:o I've been eyeing off the STM32F4 boards as they have nice specs. I tried the Visual DBG environment with one last night and found good old main() looking at me so got out fast. (no longer in Kansas Toto!!!)

I got Visual Micro to compile a generic STM32F4 board with my library which is promising so may grab a cheap $10 board and experiment as el-cheapo from Aliexpress is $11 with 192K SRAM, 1MB flash and 168Mhz M4 chip with FPU.

I too spotted all the mainly cortex M3 board with flight controller software. Nice small boards with powerful MCU, memory etc.

Problem I saw with the flight controller boards was they are a premium price so in saying that... something like a Teensy 3.5 might be good. Heaps of grunt, small and should be enough pins.

MartinL:
Hi CCCanyon,

There's the STM32Duino project that brings Arduino compatibility to STM32 microcontrollers: GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino.

However the supported hardware is aimed at STM32 development boards rather than flight controllers.

Updating the info in this thread as the above is inaccurate. STM32 Core supports 2 flight controller variants:

STM32F103CB based Naze here: https://github.com/stm32duino/Arduino_Core_STM32/tree/master/variants/AFROFLIGHT_F103CB

and STM32F303CC based Sparky V1 here:
https://github.com/stm32duino/Arduino_Core_STM32/tree/master/variants/SPARKY_F303CC

F4, F7 based flight controllers in work, as is STM32F0 based ESC variant.

Hi MGeo,

Thanks, I stand corrected.

As you mention, the Afroflight V5 and Sparky V1 flight controllers are included in the STM32 core's list of supported boards: GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino.