Skip to content

Commit 94b215e

Browse files
committed
board: nucleo_g0b1re: add CAN support
This commit adds CAN support to the nucleo_g0b1re board. Signed-off-by: Thomas Stranger <[email protected]>
1 parent 0841be5 commit 94b215e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

boards/arm/nucleo_g0b1re/doc/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ The Zephyr nucleo_g0b1re board configuration supports the following hardware fea
9696
+-----------+------------+-------------------------------------+
9797
| SPI | on-chip | spi |
9898
+-----------+------------+-------------------------------------+
99+
| CAN | on-chip | CAN 2.0 and CAN FD compliant |
100+
+-----------+------------+-------------------------------------+
99101
| CLOCK | on-chip | reset and clock control |
100102
+-----------+------------+-------------------------------------+
101103
| COUNTER | on-chip | rtc |
@@ -131,6 +133,7 @@ Default Zephyr Peripheral Mapping:
131133
- I2C2 SCL/SDA : PA11/PA12
132134
- SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI)
133135
- SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15
136+
- CAN1 TX/RX : PA11/PA12
134137
- USER_PB : PC13
135138
- LD4 : PA5
136139
- PWM : PA6

boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
zephyr,sram = &sram0;
2121
zephyr,flash = &flash0;
2222
zephyr,code-partition = &slot0_partition;
23+
zephyr,can-primary = &can1;
2324
};
2425

2526
leds {
@@ -128,6 +129,17 @@
128129
pinctrl-0 = <&dac1_out1_pa4>;
129130
};
130131

132+
&can1 {
133+
pinctrl-0 = <&fdcan1_rx_pa11 &fdcan1_tx_pa12>;
134+
bus-speed = <125000>;
135+
sjw = <1>;
136+
sample-point = <875>;
137+
bus-speed-data = <1000000>;
138+
sjw-data = <1>;
139+
sample-point-data = <875>;
140+
status = "okay";
141+
};
142+
131143
&flash0 {
132144
partitions {
133145
compatible = "fixed-partitions";

boards/arm/nucleo_g0b1re/nucleo_g0b1re.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ supported:
1818
- spi
1919
- nvs
2020
- dma
21+
- can
22+
- canfd

0 commit comments

Comments
 (0)