From c95fedd6137f166e92779b1f03ca8e770b2c9d4c Mon Sep 17 00:00:00 2001 From: Tony Sesek Date: Fri, 31 Jul 2026 10:39:23 -0700 Subject: [PATCH 1/2] app: boards: add board profile for Jhoinrch RH02 Add board profile for Jhoinrch RH02 USB<->CAN Adapter Signed-off-by: Tony Sesek --- app/boards/rh02_stm32f072xb.conf | 8 ++++++++ app/boards/rh02_stm32f072xb.overlay | 31 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 app/boards/rh02_stm32f072xb.conf create mode 100644 app/boards/rh02_stm32f072xb.overlay diff --git a/app/boards/rh02_stm32f072xb.conf b/app/boards/rh02_stm32f072xb.conf new file mode 100644 index 0000000..5d33c7f --- /dev/null +++ b/app/boards/rh02_stm32f072xb.conf @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia +# +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CANNECTIVITY_USB_SELF_POWERED=n +CONFIG_CAN_FD_MODE=n +CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS=1 +CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS=1 diff --git a/app/boards/rh02_stm32f072xb.overlay b/app/boards/rh02_stm32f072xb.overlay new file mode 100644 index 0000000..3889d9f --- /dev/null +++ b/app/boards/rh02_stm32f072xb.overlay @@ -0,0 +1,31 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "../app.overlay" + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counter2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&can1>; + activity-leds = <&led_rx &led_tx>; + }; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <47>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +}; From 942d632467fb0577bc472a612560c48d081a6dde Mon Sep 17 00:00:00 2001 From: Tony Sesek Date: Fri, 31 Jul 2026 10:39:48 -0700 Subject: [PATCH 2/2] app: boards: add board profile for Jhoinrch RH02 Plus (2026) Add board profile for Jhoinrch RH02 Plus (2026 Variant) Signed-off-by: Tony Sesek --- app/boards/rh02_plus_2026_stm32g431xx.conf | 9 ++++++ app/boards/rh02_plus_2026_stm32g431xx.overlay | 28 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 app/boards/rh02_plus_2026_stm32g431xx.conf create mode 100644 app/boards/rh02_plus_2026_stm32g431xx.overlay diff --git a/app/boards/rh02_plus_2026_stm32g431xx.conf b/app/boards/rh02_plus_2026_stm32g431xx.conf new file mode 100644 index 0000000..aa1c08a --- /dev/null +++ b/app/boards/rh02_plus_2026_stm32g431xx.conf @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia +# +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CANNECTIVITY_USB_SELF_POWERED=n + +# The two lines below are needed to reduce flash usage +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/app/boards/rh02_plus_2026_stm32g431xx.overlay b/app/boards/rh02_plus_2026_stm32g431xx.overlay new file mode 100644 index 0000000..2952f2d --- /dev/null +++ b/app/boards/rh02_plus_2026_stm32g431xx.overlay @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "../app.overlay" + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counters2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan1>; + state-led = <&blue_led>; + activity-leds = <&purple_led>; + }; + };}; + +&timers2 { + st,prescaler = <159>; + counters2: counter { + status = "okay"; + }; +};