# FYSETC-Cheetah-v2
**Repository Path**: fysetc/FYSETC-Cheetah-v2
## Basic Information
- **Project Name**: FYSETC-Cheetah-v2
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-11-30
- **Last Updated**: 2024-11-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Cheetah v2.0

## 1. Product Introduction
Cheetah 2.0 is a single-head main control board based on STM32F401, with 4 TMC2209 onboard, supports sensor-less homing, can be connected to a variety of displays, compatible with the installation size of most of the Creality 3D machines, such as ender3, ender3 V2, ender3 pro, ender5, and is also suitable for general 3D printers DIY.
## 2. Features
- Compact size: 101.5mm x 72mm,Compatible with the Creatlity ender 3 motherboard size
- Fully integrated all in one solution:
- **STM32F401MCU (Run Marlin 2.0****/****Klipper** **)**
- 4X TMC2209 stepper drivers, Support sensor-less homing
- UNIVERSAL POWER:
- Can be used with 12V/24V for motors / heated bed
- 24V to 12V/2A DC-DC for fans
- Integrated high precision power regulators (DC/DC): 5V 2A Max and 3.3V 600mA Max LDO
- 12V&24V power pin out
- Onboard TF card socket- EXP3 for 12864 display panel (Creality 12864 panel or FYSETC Generic12864)
- **EXP1&EXP2 RepRapDiscount SmartController compatible pin header on board**
- **EXP4 with I2C and UART1**
- Onboard 5V WS2812 RGB control
- SD card & USB upload support
- Car fuses for main power input
- **Up to 3 ways PWM fans** **(5/12/24 Optional)**
- PCB: FR4-TG155 PCB - Gold ENIG finishing
## 3. Application
- 3D printer
- CNC Device
- Other similar machines
## 4. Hardware
### 4.1 Hardware Reasources
| Board Name | Cheetah v2.0 |
| -------------------- | ------------------------------------------------ |
| License | GPL V2.0 |
| Latest Version | V2.0 |
| Extruders | 1 |
| Controlled Fans | 3 Max |
| Heaters | 2 Max |
| Endstops | 3 Max |
| Temp sens | 2 Max |
| UART | 1 |
| I2C | 1 |
| SWD | 1 |
| USB | 1 |
| CPU | STM32F401 |
| CPU Speed ( MHz ) | 84 Mhz |
| Stepper driver | 4X TMC2209 |
| Stepper driver Type | Onboard |
| Input| 12v/24v |
| Output| BED OUT:10A Max ;Heater Out:5A Max |
### 4.2 Connectors and jumpers define
Coming soon...
### 4.3 Pin Definition
| Features | Cheetah Pin | STM32 Pin | Pin No. | Comment |
| X-MOTOR(1) | X-Step | PC0 | 8 | |
| X-DIR | PC1 | 9 | |
| X-EN | PA8 | 41 | |
| Y-MOTOR(2) | Y-Step | PC14 | 3 | |
| Y-DIR | PC13 | 2 | |
| Y-EN | PC15 | 4 | |
| Z-MOTOR(3) | Z-Step | PB9 | 62 | |
| Z-DIR | PB8 | 61 | |
| Z-EN | PC2 | 10 | |
| E0-MOTOR(4) | E0-Step | PB2 | 28 | |
| E0-DIR | PA15 | 50 | |
| E0-EN | PD2 | 54 | |
| TMC2209 SERIAL (UART2) | TX2 | PA2 | 16 | |
| RX2 | PA3 | 17 | |
| End-stops | X-MIN | PB4 | 56 | |
| Y-MIN | PB3 | 55 | |
| Z-MIN | PC2 | 10 | |
| FAN | FAN0 | PA14 | 49 | |
| FAN1 | PA13 | 46 | |
| FAN2 | PA1 | 15 | |
| RGB | Neo-pixel | PB0 | 26 | Can be used for fan4 |
| Heating | E0-Heater | PC6 | 37 | |
| Heated-Bed | PC7 | 38 | |
| Temperature | TE0 | PC4 | 24 | |
| TB | PC5 | 25 | |
| EXP1 | BEEP | PC9 | 40 | |
| BTN_ENC | PC12 | 53 | |
| BTN_EN2 | PC11 | 52 | |
| MISO | PA6 | 22 | |
| BTN_EN1 | PC10 | 51 | |
| SCK | PA5 | 21 | |
| CS | PA4 | 20 | |
| MOSI | PA7 | 23 | |
| UART | TX | PA9/TX1 | 42 | |
| RX | PA10/RX1 | 43 | |
| I2C | I2C2 SCL | PB10 | 29 | |
| I2C2 SDA | PB11 | 30 | |
| SWD Debug | SWDIO | PA13 | 46 | only used for debugging now and can be used for other purposes. |
| SWCLK | PA14 | 49 | only used for debugging now and can be used for other purposes. |
## 5. Firmware
### 5.1 Marlin
Follow the steps below to compile the firmware yourself. More information [here](https://marlinfw.org/docs/basics/auto_build_marlin.html).
#### 5.1.1 Download Vscode + platformio
To compile the firmware , you need to install Visual Studio Code and the platformio pulg-in.
#### 5.1.2 Firmware config
You have two code source choices
##### Source 1
You can get Marlin code is in the `firmware/Marlin` folder in this repository [github](https://github.com/FYSETC/FYSETC-Cheetah-v2/tree/main/firmware/Marlin) or [gitee](https://gitee.com/fysetc/FYSETC-Cheetah-v2/tree/main/firmware/Marlin).
##### Source 2
Also you can get upstream branch from [github](https://github.com/MarlinFirmware/Marlin) or [gitee](https://gitee.com/fysetc/Marlin) (You'd better use the bugfix-2.0.x version as i just make [PR](https://github.com/MarlinFirmware/Marlin/pull/23104) 2021/10/10, so Marlin group may not integrate the code in formal version). Remember to change `default_envs` in `platformio.ini` file.
```
default_envs = FYSETC_CHEETAH_V20
```
And change `MOTHERBOARD` define according to your cheetah board version in `Configuration.h`
```
#define MOTHERBOARD BOARD_FYSETC_CHEETAH_V20
```
And serial port
```
#define SERIAL_PORT -1
#define BAUDRATE 115200
```
##### Change configuration
You need to modify your `configuration.h` and `configuration_adv.h` according to your machine. Then you can compile the firmware.
#### 5.1.3 Compile the firmware
Open Vscode and open platformio main page and click the "Open Project" button , and direct to the folder where you put your firmware.

If everything goes fine , at the bottom you can see several buttons

Just click check mark to compile.
### 5.2 Klipper
Till now(2021/11/30), Klipper don't have boot offset setting for STM32F401 chip, so we use `no Bootloader` option first.

````
make clean
make
````
Then follow the Firmware Upload section below the upload the firmware.
## 5.3 Firmware Upload
We provide several ways to upload the firmware .
### 5.3.1 Upload the firmware(SDCARD)
*If you use Klipper firmware with `No bootloader` option, you can't use this method.*
Uploading firmware using SD card is our default way to update the firmware as `Cheetah v2.0` already has the `bootloader` on it when it leave the factory. But if you once upload the firmware to `Cheetah v2.0` flash address `0x08000000`, then the bootloader in `Cheetah v2.0` will be gone, then you need to upload the bootloader to `Cheetah v2.0` yourself, please follow the README in bootloader folder ([github](https://github.com/FYSETC/FYSETC-SPIDER/tree/main/bootloader) or [gitee](https://gitee.com/fysetc/FYSETC-SPIDER/tree/main/bootloader)) to upload the bootloader.
##### How to upload firmware with bootloader
Copy your compiled firmware file ```firmware.bin```(If you use klipper firmware, you need to rename `klipper.bin` to `firmware.bin`) file to the SD card , and insert it to the SD card slot which is at the right side of the board, and then power up the board. You may need to wait for about 30s to finish uploading. When finished firmware name will change to `old.bin`.
### 5.3.2 Upload the firmware(dfu-util)
This method works in linux, that means should work in raspberry pi.
1. Enter DFU mode first
- First power off the board
- Place jumper on BT0 and 3.3V pin
- Connect USB cable to the board and your computer
- Power up the board with 24v
1. Make sure dfu-util is installed, shoot `dfu-util --version` command to check.
Sample output:
```
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
```
If not , you should install it first, use the package manager of your distribution to get the latest version, like
```
sudo apt-get install dfu-util
```
2. Power off board, remove SD Card, place jumper on BT0 and 3.3V. (Between Z- endstop and E0 driver) Connect Spider to PC/RaspberryPi with USB cable with jumper in place. Set U5V jumper closest to stepper driver modules to power Spider from the Pi USB, or power up with 24V. Verify 3.3V LED is lit and board is detected with `dfu-util --list`, should look something like
```
Found DFU: [0483:df11] ver=2200, devnum=13, cfg=1, intf=0, path="1-1.3", alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="STM32FxSTM32"
Found DFU:
```
3. You should replace `firmware.bin` below with your built firmware bin file location like `out/klipper.bin`. At the moment(2021/11/30), Klipper don't have boot offset setting when you compile, so change the following offset address `0x08008000` to `0x08000000` if you use Klipper firmware.
```
dfu-util -R -a 0 -s 0x08008000:leave -D firmware.bin
```
### 5.3.3 Upload the firmware(WINDOWS DFU)
The other way to upload the firmware is using DFU.
#### Step 1. Download stm32cubeprogrammer
You can download it from ST website.
https://www.st.com/zh/development-tools/stm32cubeprog.html
Open the STM32CubeProgrammer software.

#### Step 2. Enter DFU mode
1. First power off the board
2. Place jumper on BT0 and 3.3V pin
4. Connect USB cable to the board and your computer
5. Power up the board with 24v
Now the board is in DFU mode.
***REMEMBER to remove the jumper if you finish uploading firmware or it will enter DFU mode again.***
#### Step 3. Upload the firmware
Now you can connect and flash the Spider board with stm32cubeprogrammer with the following operation.

Do as the red number shows in the screen shot.
1. Click the button to find the DFU port.
2. Connect the DFU
3. Choose the "firmware.bin" file.
4. Fill in the 'Start address' with `0x08008000` (If you use Marlin). If you use Klipper and you choose no boot address on menuconfig when you compile Klipper, then set it `0x08000000`.
5. Start Programming
## 6. FAQ
To be done...
## 7. Tech Support
Please submit any technical issue into our [forum](http://forum.fysetc.com/)