Skip to content

Commit

Permalink
board: nucleo_g0b1re: add CAN support
Browse files Browse the repository at this point in the history
This commit adds CAN support to the nucleo_g0b1re board.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
  • Loading branch information
str4t0m committed Jun 19, 2021
1 parent 0841be5 commit 94b215e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/arm/nucleo_g0b1re/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ The Zephyr nucleo_g0b1re board configuration supports the following hardware fea
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| CAN | on-chip | CAN 2.0 and CAN FD compliant |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | reset and clock control |
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | rtc |
Expand Down Expand Up @@ -131,6 +133,7 @@ Default Zephyr Peripheral Mapping:
- I2C2 SCL/SDA : PA11/PA12
- SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI)
- SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15
- CAN1 TX/RX : PA11/PA12
- USER_PB : PC13
- LD4 : PA5
- PWM : PA6
Expand Down
12 changes: 12 additions & 0 deletions boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,can-primary = &can1;
};

leds {
Expand Down Expand Up @@ -128,6 +129,17 @@
pinctrl-0 = <&dac1_out1_pa4>;
};

&can1 {
pinctrl-0 = <&fdcan1_rx_pa11 &fdcan1_tx_pa12>;
bus-speed = <125000>;
sjw = <1>;
sample-point = <875>;
bus-speed-data = <1000000>;
sjw-data = <1>;
sample-point-data = <875>;
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/nucleo_g0b1re/nucleo_g0b1re.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ supported:
- spi
- nvs
- dma
- can
- canfd

0 comments on commit 94b215e

Please sign in to comment.