Add initial CAN FD CDC composite firmware
- Custom board definition for STM32G0B1KBU6 (ews_board) - Zephyr-based firmware with modular architecture - USB composite device: gs_usb CAN FD + CDC ACM interfaces - PFET control via CDC text commands (PA8, PB2) - Status LED on PB4, CAN FD on PB0/PB1 - No external crystal - uses HSI with USB clock recovery - Ready for build testing with: west build -b ews_board
This commit is contained in:
47
firmware/canfd_cdc_composite/README.md
Normal file
47
firmware/canfd_cdc_composite/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# CAN FD CDC Composite Firmware
|
||||
|
||||
A Zephyr-based firmware for the EWS board that provides:
|
||||
- CAN FD to gs_usb interface (similar to candlelight)
|
||||
- USB CDC interface for PFET control
|
||||
- USB composite device functionality
|
||||
|
||||
## Features
|
||||
|
||||
- **CAN FD Support**: Full CAN FD protocol support via gs_usb interface
|
||||
- **USB Composite**: Single USB device with multiple interfaces:
|
||||
- gs_usb interface for CAN communication
|
||||
- CDC ACM interface for PFET control and status
|
||||
- **PFET Control**: Control both output PFETs via CDC commands
|
||||
- **Status LEDs**: Control status LEDs for visual feedback
|
||||
- **Compatible**: Works with standard CAN utilities (can-utils, etc.)
|
||||
|
||||
## Hardware Target
|
||||
|
||||
- **MCU**: STM32G0B1KBU6 (on EWS board)
|
||||
- **CAN**: CAN FD via FDCAN1 (PB0/PB1) with SN65HVD230 transceiver
|
||||
- **USB**: USB 2.0 Full Speed (PA11/PA12)
|
||||
- **GPIOs**:
|
||||
- PFET1 control: PA8
|
||||
- PFET2 control: PB2
|
||||
- Status LED: PB4
|
||||
|
||||
## Build Requirements
|
||||
|
||||
- Zephyr RTOS (v3.5+)
|
||||
- West build tool
|
||||
- ARM GCC toolchain
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
west build -b ews_board
|
||||
```
|
||||
|
||||
## CDC Protocol
|
||||
|
||||
The CDC interface uses simple text commands:
|
||||
- `PFET1_ON\n` - Turn on PFET1
|
||||
- `PFET1_OFF\n` - Turn off PFET1
|
||||
- `PFET2_ON\n` - Turn on PFET2
|
||||
- `PFET2_OFF\n` - Turn off PFET2
|
||||
- `STATUS\n` - Get current PFET status
|
||||
Reference in New Issue
Block a user