From 6d574f6f75f69dca50e236d92dc2c47b095d52b1 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Mon, 16 Dec 2024 13:22:10 +0000 Subject: [PATCH] app: boards: add board overlay for the WeAct Studio USB2CANFDV1 Add a board overlay for the WeAct Studio USB2CANFDV1 USB to CAN adapter. Fixes: #38 Signed-off-by: Henrik Brix Andersen --- app/boards/usb2canfdv1_stm32g0b1xx.overlay | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 app/boards/usb2canfdv1_stm32g0b1xx.overlay diff --git a/app/boards/usb2canfdv1_stm32g0b1xx.overlay b/app/boards/usb2canfdv1_stm32g0b1xx.overlay new file mode 100644 index 0000000..802027f --- /dev/null +++ b/app/boards/usb2canfdv1_stm32g0b1xx.overlay @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Henrik Brix Andersen + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counter2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan1>; + state-gpios = <&gpioa 2 GPIO_ACTIVE_LOW>; + activity-gpios = <&gpioa 0 GPIO_ACTIVE_LOW>, + <&gpioa 1 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&zephyr_udc0 { + gs_usb0: gs_usb0 { + compatible = "gs_usb"; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <59>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +};