-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Enable CAN peripheral on STM32G0 #34963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b67405
566df20
c2f31b2
583cbd1
0841be5
94b215e
ececbf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,5 @@ supported: | |
| - spi | ||
| - nvs | ||
| - dma | ||
| - can | ||
| - canfd | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,5 +104,69 @@ | |
| dma-channels = <12>; | ||
| dma-requests = <73>; | ||
| }; | ||
|
|
||
| can { | ||
| compatible = "bosch,m-can-base"; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| std-filter-elements = <28>; | ||
| ext-filter-elements = <8>; | ||
| rx-fifo0-elements = <3>; | ||
| rx-fifo1-elements = <3>; | ||
| rx-buffer-elements = <0>; | ||
| tx-buffer-elements = <3>; | ||
|
|
||
| can1: can@40006400 { | ||
| compatible = "st,stm32-fdcan"; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reg = <0x40006400 0x400>, <0x4000B400 0x350>; | ||
| reg-names = "m_can", "message_ram"; | ||
| interrupts = <21 0>, <22 0>; | ||
| interrupt-names = "LINE_0", "LINE_1"; | ||
| shared-irqs = <&shared_irq21 &shared_irq22>; | ||
| shared-irq-names = "LINE_0", "LINE_1"; | ||
| status = "disabled"; | ||
| label = "CAN_1"; | ||
| }; | ||
|
|
||
| can2: can@40006800 { | ||
| compatible = "st,stm32-fdcan"; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reg = <0x40006800 0x400>, <0x4000B750 0x350>; | ||
| reg-names = "m_can", "message_ram"; | ||
| interrupts = <21 0>, <22 0>; | ||
|
||
| interrupt-names = "LINE_0", "LINE_1"; | ||
| shared-irqs = <&shared_irq21 &shared_irq22>; | ||
| shared-irq-names = "LINE_0", "LINE_1"; | ||
| status = "disabled"; | ||
| label = "CAN_2"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| shared_irq21: shared_irq21 { | ||
| compatible = "shared-irq"; | ||
| interrupt-parent = <&nvic>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <2>; | ||
| interrupts = <21 0>; | ||
| interrupt-names = "tim16_fdcan_it0"; | ||
| #shared-irq-cells = <0>; | ||
| status = "disabled"; | ||
| label = "SHARED_IRQ_21"; | ||
| }; | ||
|
|
||
| shared_irq22: shared_irq22 { | ||
| compatible = "shared-irq"; | ||
| interrupt-parent = <&nvic>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <2>; | ||
| interrupts = <22 0>; | ||
| interrupt-names = "tim17_fdcan_it1"; | ||
| #shared-irq-cells = <0>; | ||
| status = "disabled"; | ||
| label = "SHARED_IRQ_22"; | ||
| }; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since shared-irq can't be used alone, what about having this symbol selected by clients, when needed.