Skip to content

Commit 7e9e425

Browse files
committed
feat: unoq: add can support
Add FDCAN on pins 4/5. Tested with code from zephyrproject-rtos/zephyr#94973 Need to integrate with RPC subsystem and a mix of slcan and socat
1 parent a338a5e commit 7e9e425

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

loader/llext_exports.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ EXPORT_SYMBOL(sqrtf);
6060
EXPORT_SYMBOL(k_sched_lock);
6161
EXPORT_SYMBOL(k_sched_unlock);
6262

63+
EXPORT_SYMBOL(bin2hex);
64+
EXPORT_SYMBOL(hex2bin);
65+
6366
#if defined(CONFIG_USB_DEVICE_STACK)
6467
EXPORT_SYMBOL(usb_enable);
6568
EXPORT_SYMBOL(usb_disable);
@@ -308,3 +311,7 @@ FORCE_EXPORT_SYM(fs_mkfs);
308311
FORCE_EXPORT_SYM(fs_register);
309312
FORCE_EXPORT_SYM(fs_unregister);
310313
#endif
314+
315+
#if defined(CONFIG_CAN)
316+
#include <zephyr/drivers/can.h>
317+
#endif

variants/arduino_uno_q_stm32u585xx/arduino_uno_q_stm32u585xx.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ CONFIG_DYNAMIC_THREAD=y
3737
CONFIG_DYNAMIC_THREAD_POOL_SIZE=2
3838
CONFIG_DYNAMIC_THREAD_ALLOC=y
3939

40+
CONFIG_CAN=y
41+
CONFIG_CAN_FD_MODE=y
42+
CONFIG_CAN_MAX_FILTER=8
43+
CONFIG_CAN_ACCEPT_RTR=y
44+
CONFIG_CAN_STM32_FDCAN=y
45+
4046
#CONFIG_VIDEO=y
4147
#CONFIG_VIDEO_LOG_LEVEL_DBG=y
4248
#CONFIG_VIDEO_STM32_DCMI=y

variants/arduino_uno_q_stm32u585xx/arduino_uno_q_stm32u585xx.overlay

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/{
2+
chosen {
3+
zephyr,canbus = &fdcan1;
4+
};
5+
};
6+
17
&i2c4 {
28
status = "okay";
39
pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>;
@@ -22,6 +28,12 @@
2228
*/
2329
};
2430

31+
&fdcan1 {
32+
pinctrl-0 = <&fdcan1_rx_pa11 &fdcan1_tx_pa12>;
33+
pinctrl-names = "default";
34+
status = "okay";
35+
};
36+
2537
/* clock from HSI48 */
2638
&mco1 {
2739
status = "okay";

0 commit comments

Comments
 (0)