Skip to content

Commit

Permalink
feat: add convertdevice xCANFD config info
Browse files Browse the repository at this point in the history
  • Loading branch information
ConvertDevice authored and fenugrec committed Apr 22, 2023
1 parent 4d7abdf commit 4dc288d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ endfunction()
set(TGTF042_LIST "cantact" "canalyze" "canable" "usb2can" "cannette")
set(TGTF072_LIST "candleLight" "CANable_MKS" "CONVERTDEVICE_xCAN" "DSD_TECH_SH_C30A" "FYSETC_UCAN")
set(TGTF407_LIST "STM32F4_DevBoard")
set(TGTG0B1_LIST "budgetcan")
set(TGTG0B1_LIST "budgetcan" "CONVERTDEVICE_xCANFD")

foreach (TGTNAME IN LISTS TGTF042_LIST)
option(BUILD_${TGTNAME} "Build firmware for \"${TGTNAME}\" (default=yes)" ON)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This is firmware for certain STM32F042x/STM32F072xB-based USB-CAN adapters, nota
- Entreé: https://github.com/tuna-f1sh/entree (STM32F042x6)
- CANable-MKS: https://github.com/makerbase-mks/CANable-MKS (STM32F072xB)
- ConvertDevice-xCAN: https://github.com/ConvertDevice/xCAN (STM32F072xB)
- ConvertDevice-xCANFD: https://github.com/ConvertDevice/xCANFD (STM32G0B1CBT6)
- DSD TECH SH-C30A: https://www.deshide.com/product-details.html?pid=384242&_t=1671089557 (STM32F072xB)
- FYSETC UCAN: https://www.fysetc.com/products/fysetc-ucan-board-based-on-stm32f072-usb-to-can-adapter-support-with-canable-candlelight-klipper-firmware (STM32F072xB)

Expand Down
27 changes: 27 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,33 @@ THE SOFTWARE.
#define LEDTX_Mode GPIO_MODE_OUTPUT_PP
#define LEDTX_Active_High 0

#elif defined(BOARD_CONVERTDEVICE_xCANFD)
#define USBD_PRODUCT_STRING_FS (uint8_t*) "ConvertDevice xCANFD"
#define USBD_MANUFACTURER_STRING (uint8_t*) "ConvertDevice"
#define DFU_INTERFACE_STRING_FS (uint8_t*) "ConvertDevice xCANFD firmware upgrade interface"
#define CAN_INTERFACE FDCAN1
#define CAN_CLOCK_SPEED 64000000
#define NUM_CAN_CHANNEL 1
#define CANFD_SUPPORT

#define LEDRX_GPIO_Port GPIOA
#define LEDRX_Pin GPIO_PIN_0
#define LEDRX_Mode GPIO_MODE_OUTPUT_PP
#define LEDRX_Active_High 0

#define LEDTX_GPIO_Port GPIOA
#define LEDTX_Pin GPIO_PIN_1
#define LEDTX_Mode GPIO_MODE_OUTPUT_PP
#define LEDTX_Active_High 0

#define USB_GPIO_Port GPIOA
#define USB_Pin_DM GPIO_PIN_11
#define USB_Pin_DP GPIO_PIN_12

#define CANFDIF_GPIO_Port GPIOB
#define CANFDIFRX_Pin GPIO_PIN_8
#define CANFDIFTX_Pin GPIO_PIN_9

#elif defined(BOARD_DSD_TECH_SH_C30A)
#define USBD_PRODUCT_STRING_FS (uint8_t*) "SH-C30A USB to CAN adapter"
#define USBD_MANUFACTURER_STRING (uint8_t*) "DSD TECH"
Expand Down

0 comments on commit 4dc288d

Please sign in to comment.