diff --git a/app/boards/ucan_stm32f072xb.conf b/app/boards/ucan_stm32f072xb.conf new file mode 100644 index 0000000..58cd24d --- /dev/null +++ b/app/boards/ucan_stm32f072xb.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Henrik Brix Andersen +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CAN_FD_MODE=n diff --git a/app/boards/ucan_stm32f072xb.overlay b/app/boards/ucan_stm32f072xb.overlay new file mode 100644 index 0000000..bed06db --- /dev/null +++ b/app/boards/ucan_stm32f072xb.overlay @@ -0,0 +1,37 @@ +/* + * 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 = <&can1>; + activity-gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>, + <&gpioa 1 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&zephyr_udc0 { + gs_usb0: gs_usb0 { + compatible = "gs_usb"; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <47>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +}; diff --git a/app/sample.yaml b/app/sample.yaml index deb7c86..0346996 100644 --- a/app/sample.yaml +++ b/app/sample.yaml @@ -26,6 +26,7 @@ tests: - nucleo_h723zg - usb2canfdv1 - candlelight + - ucan app.cannectivity.sof: depends_on: - usb_device