https://github.com/jherkenhoff/xmc_cleanflight_doc
Documentation for Infineons Cleanflight port for the XMC microcontroller Series
https://github.com/jherkenhoff/xmc_cleanflight_doc
cleanflight drone infineon xmc
Last synced: 3 months ago
JSON representation
Documentation for Infineons Cleanflight port for the XMC microcontroller Series
- Host: GitHub
- URL: https://github.com/jherkenhoff/xmc_cleanflight_doc
- Owner: jherkenhoff
- License: gpl-3.0
- Created: 2018-05-19T08:17:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-24T19:34:39.000Z (almost 8 years ago)
- Last Synced: 2023-08-09T11:54:23.311Z (almost 3 years ago)
- Topics: cleanflight, drone, infineon, xmc
- Homepage: https://github.com/WielandD/XMC_Cleanflight
- Size: 4.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XMC Cleanflight

This tutorial is going to walk you through installing [Cleanflight](http://cleanflight.com/) on the **Cerasus** flight controller from Infineon. You do not need programming skills to follow this tutorial.
For those unfamiliar with Cleanflight. It is an open source flight-controller firmware which is used on a broad range of commercial and open source flight-controllers. Since it is targeted towards 32 bit MCU's it provides a perfect base for the Cerasus.
In addition to the firmware setup the build of the **Racecopter** drone hardware is shown. Note that the hardware is not coupled to the Cerasus sontroller, so you can choose to build your custom hardware.
* [Requirements](#requirements)
* [Hardware used in this build](#used-in-this-build)
* [Cerasus Flight Controller](#cerasus-flight-controller)
* [Firmware](#used-in-this-build)
* [Download](#download)
* [Build](#build)
* [Flashing](#flashing)
* [Configure](#configure)
* [Hardware build](#hardware-build)
# Requirements
To follow this guide, you need the following hardware and software:
* Infineon Cerasus V1.0 flight controller
* i-Bus receiver
* [XMC Link debugger](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_link_segger_v1/)
* Windows PC with [DAVE 4.x](https://infineoncommunity.com/dave-download_ID645) software installed
* General drone hardware (X4 Drone frame with Motors, Props, ESC and batteries etc.)
> **For Linux users:** I managed to get DAVE 4.4.2 running in Wine. You need to install the Segger J-Link tools used for flashing manually using the official [Segger Packages](https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack)
## Hardware used in this build:
* Custom carbon fiber X4 frame
* Racerstar [BR2205 2300KV](http://www.racerstar.com/Racerstar-Racing-Edition-2205-BR2205-2300KV-2-4S-Brushless-Motor-Red-CW-or-CCW-for-220-250-RC-Drone-FPV-Racing-p-33.html) brushless motor
* Racerstar Rev35A 4in1 ESC
* FS-i6 Transmitter
* Flysky FS-A8S i-Bus receiver
* Tattu 1550mAH 4S LiPo battery pack
You might as well use any other drone hardware as long as it fulfills the requirements listed in the Requirements section.
The *Cerasus* is a flight controller designed by Infineon. It is equipped with a microcontroller from Infineons XMC series (XMC4500 - 32 Bit ARM Cortex M4).
Top | Bottom
-----------------------------------------|-----------------------------------------
| 
The Cerasus can be configured using the [Cleanflight Configurator](https://github.com/cleanflight/cleanflight-configurator) via USB. (Details in the [Configure](#configure) section)
You do not need to hook up a battery to configure and play around with the flight-controller, since it can be powered from USB. But don't be afraid to hook up your USB cable when its powered from battery: A diode in the supply rail protects your USB Port from overvoltage..
The Cerasus flight-controller outputs four PWM signals for "communication" with the ESC. The numbering in the picture above (PWM 1 - PWM 4) represents the corresponding motor number. The individual pins are labeled on the PCB.
There are two connectors labeled *RC* on the PCB. Since my receiver came with a 4-Pin plug, I used the 4-Pin connector on the bottom side of the PCB.
### Download
The Firmware for the Cerasus flight controller is located in [this repository](https://github.com/WielandD/XMC_Cleanflight).
An error accours when opening the project in Dave, when you downloaded the repository using `git clone`. As a workaround you can just download the repository by pressing the `Download Zip` button in github.

Unzip the contents to a destination of your choice..
### Build
Launch the Dave IDE and choose a workspace folder. (For example a folder named *Workspace* in your home directory. Do not use the just downloaded repository as your workspace.)
Choose `File > Import` from the top menu bar. Then choos `Infineon >> Dave Project` and click on *next*.

Browse to the folder you unzipped the contents of the git-repo into.
The entry *XMC_Cleanflight* should apear in the project list.

After the project has finished loading you need to activate the correct build configuration. Rightclick on the *XMC_Cleanflight* entry in the left sidepanel and select `Build Configurations > Set Active > Cerasus` from the context menu.

Now its time to build the firmware. Click on `Project > Build All` in the top bar to start the building process.
If everything went well, the console on the bottom of the screen should print *Build Finished*.
Flashing the firmware to the Mikrocontroller is done using the XMC Link debugger. There are multiple options for flashing and even debugging your freshly build firmware on your hardware (for example directly out of Dave or via the Segger GDB Server). Here I want to show one possibility that is quite straight forward.. For that, you need to open the `J-Flash Lite` Programm.
Right after the start of the program it asks you to select the correct Mikrocontroller. For the Cerasus flight controller you need to choose the *Infineon XMC45000-1024* entry. Make sure the *Interface* settings match the one on the screenshot.

After clicking Ok, you need to select your hex file you want to download to the mikrocontroller.
Navigate to your Dave-Workspace you selected when you first started the Dave software. (Remember? In the [Build](#build) section..)
The hex file should be located in the `[DaveWorkspace] > XMC_Cleanflight > Cerasus > XMC_Cleanflight.hex`.
After you selected the correct file, there is nothing stopping you from pressing the "Program Device" button!

If everything went right, the latest entry in the log should say "Done".
## Configure
Channel mapping
Motor direcion
Save nach Dump
Config file
ESC Calibration
## Check Motor direction
## FLY