dts: can: allow individual specification of prop seg and phase seg1 quanta
Allow individual specification of the time quanta used for the CAN bus propagation segment and phase segment 1. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
d2f5a2c1dc
commit
dded1d076a
8 changed files with 24 additions and 13 deletions
|
@ -104,8 +104,9 @@ arduino_spi: &spi1 {};
|
|||
&can1 {
|
||||
bus-speed = <125000>;
|
||||
sjw = <1>;
|
||||
prop_seg_phase_seg1 = <6>;
|
||||
phase_seg2 = <5>;
|
||||
prop-seg = <0>;
|
||||
phase-seg1 = <6>;
|
||||
phase-seg2 = <5>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -820,7 +820,7 @@ static const struct can_stm32_config can_stm32_cfg_1 = {
|
|||
.can = (CAN_TypeDef *)DT_CAN_1_BASE_ADDRESS,
|
||||
.bus_speed = DT_CAN_1_BUS_SPEED,
|
||||
.sjw = DT_CAN_1_SJW,
|
||||
.prop_bs1 = DT_CAN_1_PROP_SEG_PHASE_SEG1,
|
||||
.prop_bs1 = DT_CAN_1_PROP_SEG + DT_CAN_1_PHASE_SEG1,
|
||||
.bs2 = DT_CAN_1_PHASE_SEG2,
|
||||
.pclken = {
|
||||
.enr = DT_CAN_1_CLOCK_BITS,
|
||||
|
|
|
@ -76,8 +76,9 @@
|
|||
label = "CAN_1";
|
||||
bus-speed = <250000>;
|
||||
sjw = <1>;
|
||||
prop_seg_phase_seg1 = <5>;
|
||||
phase_seg2 = <6>;
|
||||
prop-seg = <0>;
|
||||
phase-seg1 = <5>;
|
||||
phase-seg2 = <6>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -278,8 +278,9 @@
|
|||
label = "CAN_1";
|
||||
bus-speed = <125000>;
|
||||
sjw = <1>;
|
||||
prop_seg_phase_seg1 = <4>;
|
||||
phase_seg2 = <5>;
|
||||
prop-seg = <0>;
|
||||
phase-seg1 = <4>;
|
||||
phase-seg2 = <5>;
|
||||
};
|
||||
|
||||
rtc: rtc@40002800 {
|
||||
|
|
|
@ -32,12 +32,17 @@ properties:
|
|||
category: required
|
||||
description: Resynchronization jump width (ISO 11898-1)
|
||||
generation: define
|
||||
prop_seg_phase_seg1:
|
||||
prop-seg:
|
||||
type: int
|
||||
category: required
|
||||
description: Time quantums of phase buffer 1 segment + propagation segment (ISO 11898-1)
|
||||
description: Time quantums of propagation segment (ISO 11898-1)
|
||||
generation: define
|
||||
phase_seg2:
|
||||
phase-seg1:
|
||||
type: int
|
||||
category: required
|
||||
description: Time quantums of phase buffer 1 segment (ISO 11898-1)
|
||||
generation: define
|
||||
phase-seg2:
|
||||
type: int
|
||||
category: required
|
||||
description: Time quantums of phase buffer 2 segment (ISO 11898-1)
|
||||
|
|
|
@ -113,7 +113,8 @@
|
|||
#define DT_CAN_1_IRQ DT_ST_STM32_CAN_40006400_IRQ_0
|
||||
#define DT_CAN_1_IRQ_PRIORITY DT_ST_STM32_CAN_40006400_IRQ_0_PRIORITY
|
||||
#define DT_CAN_1_SJW DT_ST_STM32_CAN_40006400_SJW
|
||||
#define DT_CAN_1_PROP_SEG_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PROP_SEG_PHASE_SEG1
|
||||
#define DT_CAN_1_PROP_SEG DT_ST_STM32_CAN_40006400_PROP_SEG
|
||||
#define DT_CAN_1_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PHASE_SEG1
|
||||
#define DT_CAN_1_PHASE_SEG2 DT_ST_STM32_CAN_40006400_PHASE_SEG2
|
||||
#define DT_CAN_1_CLOCK_BUS DT_ST_STM32_CAN_40006400_CLOCK_BUS
|
||||
#define DT_CAN_1_CLOCK_BITS DT_ST_STM32_CAN_40006400_CLOCK_BITS
|
||||
|
|
|
@ -382,7 +382,8 @@
|
|||
#define DT_CAN_1_IRQ_SCE DT_ST_STM32_CAN_40006400_IRQ_SCE
|
||||
#define DT_CAN_1_IRQ_PRIORITY DT_ST_STM32_CAN_40006400_IRQ_0_PRIORITY
|
||||
#define DT_CAN_1_SJW DT_ST_STM32_CAN_40006400_SJW
|
||||
#define DT_CAN_1_PROP_SEG_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PROP_SEG_PHASE_SEG1
|
||||
#define DT_CAN_1_PROP_SEG DT_ST_STM32_CAN_40006400_PROP_SEG
|
||||
#define DT_CAN_1_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PHASE_SEG1
|
||||
#define DT_CAN_1_PHASE_SEG2 DT_ST_STM32_CAN_40006400_PHASE_SEG2
|
||||
#define DT_CAN_1_CLOCK_BUS DT_ST_STM32_CAN_40006400_CLOCK_BUS
|
||||
#define DT_CAN_1_CLOCK_BITS DT_ST_STM32_CAN_40006400_CLOCK_BITS
|
||||
|
|
|
@ -304,7 +304,8 @@
|
|||
#define DT_CAN_1_IRQ_SCE DT_ST_STM32_CAN_40006400_IRQ_SCE
|
||||
#define DT_CAN_1_IRQ_PRIORITY DT_ST_STM32_CAN_40006400_IRQ_0_PRIORITY
|
||||
#define DT_CAN_1_SJW DT_ST_STM32_CAN_40006400_SJW
|
||||
#define DT_CAN_1_PROP_SEG_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PROP_SEG_PHASE_SEG1
|
||||
#define DT_CAN_1_PROP_SEG DT_ST_STM32_CAN_40006400_PROP_SEG
|
||||
#define DT_CAN_1_PHASE_SEG1 DT_ST_STM32_CAN_40006400_PHASE_SEG1
|
||||
#define DT_CAN_1_PHASE_SEG2 DT_ST_STM32_CAN_40006400_PHASE_SEG2
|
||||
#define DT_CAN_1_CLOCK_BUS DT_ST_STM32_CAN_40006400_CLOCK_BUS
|
||||
#define DT_CAN_1_CLOCK_BITS DT_ST_STM32_CAN_40006400_CLOCK_BITS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue