Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/hardware/CC2/assets/J6_header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hardware/CC2/assets/UART_headers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions docs/hardware/CC2/fel-uart-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# CC2 FEL & UART Bench Setup

This guide describes how to set up a Centauri Carbon 2 mainboard on a bench for FEL access/eMMC recovery and UART access to u-Boot and Linux.

!!! info
This setup is useful for:

- Accessing FEL mode for eMMC recovery
- Serial console access to u-Boot and Linux
- Advanced debugging and development work

!!! note "Differences from the CC1"
The CC2 uses the same Allwinner R528/T113 SoC as the CC1, so the wiring and FEL/UART workflow are nearly identical. Two hardware differences matter:

- **No usable USB-C port.** The CC1's USB-C FEL options (modified cable / power blocker) don't exist here — the CC2's external "USB-C-shaped" connector is a **2-pin 24V power terminal, not USB**. On the CC2 you reach the FEL USB lines through the **FEL header (J6)** instead.
- **No R53 resistor to short.** You enter FEL with the onboard **buttons** (SW1/SW2), not by shorting a resistor.

## Hardware Requirements

You will need the following components:

- **24V Power Supply**
- **3.3V USB Serial UART Dongle** (e.g., [Amazon Link](https://a.co/d/0fSMDXwf))
- *Alternative:* A Raspberry Pi or ESP32 acting as a serial interface
- Dupont jumper cables for the UART wiring are often included with the dongle
- **FEL USB Connection** — a **USB-A male to dupont female cable** wired to the board's **FEL header (J6)**. Unlike the CC1 there is no USB-C port to use, so this header is the only FEL entry point. (Sold pre-assembled as "USB to dupont" / "USB to 4-pin" — e.g., [Amazon Link](https://www.amazon.com/dp/B09ZFKFPHS) — or solder one from a sacrificial USB-A cable.)

## Critical Warnings

!!! danger "VOLTAGE DANGER"
The CC2's external **USB-C-shaped connector is a 2-pin 24V power terminal, not USB.** Do **not** plug a USB device into it — you will destroy whatever you connect. Use the **FEL header (J6)** for the USB/FEL connection.

!!! warning "Safety Precautions"
- **Ground Continuity:** Ensure continuity of Ground between all peripherals
- **Loose Wires:** If a 24V power/ground wire comes loose, it can cause power to flow across the UART, which **will destroy one or more board chips**
- **Power Sequencing:** **Do not** plug or unplug components (even the USB) while anything is powered up. Insert the USB and USB-UART connections while the board is **powered down**

## Step-by-Step Hookup

!!! important
Complete all steps with the power supply **disconnected**. Only apply power after all connections are securely in place.

### 1. Power Connection

Connect the **24V VCC** and **Ground** wires to your external power supply.

See the **24V Input** tab on the [mainboard pinout](mainboard.md) page for the exact pin locations.

### 2. UART Connection

Connect the **3.3V Serial UART Tx, Rx, and Ground** between the CC2 **UART0** header and your serial interface (USB dongle, Pi, etc.).

**Pin Connections:**

- TX (Transmit from board) → RX on your serial adapter
- RX (Receive to board) → TX on your serial adapter
- GND → GND

!!! important
Do not connect the VCC (5V) pin on the UART header.

UART0 is the **lower** 4-pin row of the 2×4 UART0/DSP header (the upper row is the DSP console). See the **UART0/DSP** tab on the [mainboard pinout](mainboard.md) page for the exact pin locations.

![CC2 UART headers](assets/UART_headers.jpg){ width="500" }

### 3. FEL / USB Connection

The CC2 has no USB-C port for FEL — connect through the **FEL header (J6)** using a **USB-A male to dupont female cable**.

Wire the FEL header to the USB-A plug as follows:

| FEL header (J6) | Marking | USB-A pin | Wire (typical) |
|---|---|---|---|
| 1 (closest to eMMC) | GND | 4 (GND) | black |
| 2 | DP | 3 (D+) | green |
| 3 | DM | 2 (D−) | white |
| 4 (farthest) | 5V | 1 (VBUS / +5V) | red |

!!! warning
**DP and DM are swapped compared to a standard USB-A pinout.** Don't build a straight-through cable — follow the table above. See the **FEL** tab on the [mainboard pinout](mainboard.md) page.

![CC2 FEL header (J6)](assets/J6_header.jpg){ width="320" }

### 4. Entering FEL Mode

The CC2 has **no R53 resistor to short** (unlike the CC1) — FEL is entered with the onboard buttons:

1. With the USB and UART connected and the board powered, **press and hold SW2** (the FEL/boot button, next to J6).
2. While holding SW2, **press and release SW1** (reset, next to the UART0 header).
3. Keep SW2 held ~2 seconds, then release.

Your PC should enumerate the FEL device (USB ID `1F3A` `EFE8`). On Windows you'll need to install the WinUSB driver.

For installing the WinUSB driver and the `sunxi-fel` tool, see [§2 — Install tools](https://github.com/OpenCentauri/cc-fw-tools/blob/main/docs/EMMC_BACKUP_RESTORE_CC2.md#2-install-tools) in the CC2 eMMC backup/restore guide.

## Related Documentation

- [CC2 Mainboard Pinout](mainboard.md) — 24V input, UART0/DSP, and FEL header pin details
- [CC2 eMMC Backup / Restore](https://github.com/OpenCentauri/cc-fw-tools/blob/main/docs/EMMC_BACKUP_RESTORE_CC2.md) — full step-by-step backup and restore procedure (cc-fw-tools)
27 changes: 27 additions & 0 deletions docs/software/FEL-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ Install the sunxi-fel utility (provides `sunxi-fel` command):
sudo apt install sunxi-tools
```

#### Windows

For Windows, a precompiled `sunxi-fel.exe` from BigTreeTech is available in the
[cc-fw-tools repo](https://github.com/OpenCentauri/cc-fw-tools/blob/main/extra-stuff/emmc/sunxi-fel.exe).
Download it, drop it in your working folder, and run `.\sunxi-fel.exe ...` in place of the
`sunxi-fel ...` commands below. You'll still need the WinUSB driver (see
[Windows: Install USB Driver](#windows-install-usb-driver)).

### Install xfel Tool

Clone and build the allwinner-xfel repository:
Expand Down Expand Up @@ -65,6 +73,11 @@ When successful, you should see on the UART console:
!!! note
This UART output will only display if you are booting from u-Boot (using the `efex` command) and your BOOT0 has UART enabled. OpenCentauri enables UART by default in the latest versions. If booting directly into FEL mode via hardware reset, you may not see this output.

You should also see a red LED on the board blink **once** when it enters FEL mode.

![Red LED that blinks once on FEL entry](assets/fel-mode-red-led.jpg){ width="300" }


### Method 2: Software Boot (From u-Boot)

If you already have u-Boot running and UART access, you can boot directly to FEL mode by issuing this command in u-Boot:
Expand Down Expand Up @@ -117,6 +130,20 @@ Returning back to FEL.
!!! info "UART Initialization Required"
This command appears to be required to run at least once to correctly initialize the Serial UART on the R528 chip before proceeding with DDR initialization and loading u-Boot.

### Alternative: Load u-Boot in One Step (sunxi-fel)

Instead of Steps 3 and 4 below (the `xfel` DDR-init → write → exec sequence), you can load u-Boot
with a single `sunxi-fel` command that handles DRAM init, loading, and execution at once:

```bash
sunxi-fel uboot u-boot-sunxi-with-spl-cc1.bin
```

The [`u-boot-sunxi-with-spl-cc1.bin`](https://github.com/OpenCentauri/cc-fw-tools/blob/main/extra-stuff/emmc/u-boot-sunxi-with-spl-cc1.bin)
build is in the [cc-fw-tools](https://github.com/OpenCentauri/cc-fw-tools) repo. You'll land at the
`=>` U-Boot prompt on the UART console (no key-press needed), then continue from
[eMMC Recovery](#emmc-recovery).

### Step 3: Initialize DDR

Now that FEL mode is verified, initialize the DDR memory:
Expand Down
Binary file added docs/software/assets/fel-mode-red-led.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ nav:
- CC2:
- Hardware: hardware/CC2/index.md
- Mainboard: hardware/CC2/mainboard.md
- FEL & UART Setup: hardware/CC2/fel-uart-setup.md
- Toolhead: hardware/CC2/toolhead.md
- Camera: hardware/CC2/camera.md
- Bed: hardware/CC2/bed.md
Expand Down