Home
last modified time | relevance | path

Searched full:bitrate (Results 1 – 25 of 139) sorted by relevance

123456

/Zephyr-latest/include/zephyr/devicetree/
Dcan.h26 * @brief Get the minimum transceiver bitrate for a CAN controller
28 * The bitrate will be limited to the minimum bitrate supported by the CAN
30 * bitrate will be that of the CAN controller.
36 * min-bitrate = <15000>;
37 * max-bitrate = <1000000>;
50 * min-bitrate = <25000>;
51 * max-bitrate = <2000000>;
59 * max-bitrate = <2000000>;
71 * @param min minimum bitrate supported by the CAN controller
72 * @return the minimum bitrate supported by the CAN controller/transceiver combination
[all …]
/Zephyr-latest/dts/bindings/can/
Dcan-controller.yaml10 Deprecated. This property has been renamed to bitrate.
12 Initial bitrate in bit/s. If this is unset, the initial bitrate is set to
14 bitrate:
17 Initial bitrate in bit/s. If this is unset, the initial bitrate is set to
36 max-bitrate = <1000000>;
55 max-bitrate = <1000000>;
60 min-bitrate:
63 The minimum bitrate supported by the CAN transceiver in bits/s.
65 max-bitrate:
69 The maximum bitrate supported by the CAN transceiver in bits/s.
Dcan-fd-controller.yaml10 Deprecated. This property has been renamed to bitrate-data.
12 Initial data phase bitrate in bit/s. If this is unset, the initial data phase bitrate is set
14 bitrate-data:
17 Initial data phase bitrate in bit/s. If this is unset, the initial data phase bitrate is set
/Zephyr-latest/dts/bindings/phy/
Dcan-transceiver.yaml9 min-bitrate:
12 The minimum bitrate supported by the CAN transceiver in bits/s.
14 max-bitrate:
18 The maximum bitrate supported by the CAN transceiver in bits/s.
/Zephyr-latest/drivers/i2c/
Di2c_nrfx_twim_common.h20 #define I2C_NRFX_TWIM_FREQUENCY(bitrate) \ argument
21 (bitrate == I2C_BITRATE_STANDARD ? NRF_TWIM_FREQ_100K \
22 : bitrate == 250000 ? NRF_TWIM_FREQ_250K \
23 : bitrate == I2C_BITRATE_FAST \
26 (bitrate == I2C_BITRATE_FAST_PLUS ? NRF_TWIM_FREQ_1000K :)) \
Di2c_nrfx_twi_common.h18 #define I2C_NRFX_TWI_FREQUENCY(bitrate) \ argument
19 (bitrate == I2C_BITRATE_STANDARD ? NRF_TWI_FREQ_100K \
20 : bitrate == 250000 ? NRF_TWI_FREQ_250K \
21 : bitrate == I2C_BITRATE_FAST ? NRF_TWI_FREQ_400K \
Di2c-priv.h18 static inline uint32_t i2c_map_dt_bitrate(uint32_t bitrate) in i2c_map_dt_bitrate() argument
20 switch (bitrate) { in i2c_map_dt_bitrate()
Di2c_renesas_ra_iic.c57 uint32_t bitrate; member
333 result->bitrate = in calc_iic_master_bitrate()
348 " [output] bitrate[%u] duty[%u] divider[%u] brh[%u] brl[%u] " in calc_iic_master_bitrate()
350 __func__, total_brl_brh, brh, divider, result->bitrate, result->duty, in calc_iic_master_bitrate()
377 /* Start with maximum possible bitrate. */ in calc_iic_master_clock_setting()
380 struct ra_iic_master_bitrate bitrate = {}; in calc_iic_master_clock_setting() local
382 calc_iic_master_bitrate(config, min_brl_brh, min_brh, 0, &bitrate); in calc_iic_master_clock_setting()
394 /* If the requested bitrate cannot be achieved with this divider, continue. in calc_iic_master_clock_setting()
412 /* Calculate the actual bitrate and duty cycle. */ in calc_iic_master_clock_setting()
463 bitrate = temp_bitrate; in calc_iic_master_clock_setting()
[all …]
Di2c_sam_twihs.c47 uint32_t bitrate; member
108 uint32_t bitrate; in i2c_sam_twihs_configure() local
125 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twihs_configure()
128 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twihs_configure()
136 ret = i2c_clk_set(twihs, bitrate); in i2c_sam_twihs_configure()
308 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twihs_initialize()
344 .bitrate = DT_INST_PROP(n, clock_frequency), \
Di2c_sam_twi.c47 uint32_t bitrate; member
110 uint32_t bitrate; in i2c_sam_twi_configure() local
127 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twi_configure()
130 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twi_configure()
140 ret = i2c_clk_set(twi, bitrate); in i2c_sam_twi_configure()
337 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twi_initialize()
376 .bitrate = DT_INST_PROP(n, clock_frequency), \
Di2c_sam_twihs_rtio.c48 uint32_t bitrate; member
96 uint32_t bitrate; in i2c_sam_twihs_configure() local
113 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twihs_configure()
116 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twihs_configure()
124 ret = i2c_clk_set(twihs, bitrate); in i2c_sam_twihs_configure()
312 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twihs_initialize()
355 .bitrate = DT_INST_PROP(n, clock_frequency), \
Di2c_litex.c33 uint32_t bitrate; member
102 I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_litex_init()
155 .bitrate = DT_INST_PROP(n, clock_frequency), \
Di2c_sbcon.c43 uint32_t bitrate; /* I2C bus speed in Hz */ member
135 I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_sbcon_init()
149 .bitrate = DT_INST_PROP(_num, clock_frequency), \
/Zephyr-latest/drivers/can/
Dcan_common.c213 * @brief Get the sample point location for a given bitrate
215 * @param bitrate The bitrate in bits/second.
218 static uint16_t sample_point_for_bitrate(uint32_t bitrate) in sample_point_for_bitrate() argument
222 if (bitrate > 800000) { in sample_point_for_bitrate()
225 } else if (bitrate > 500000) { in sample_point_for_bitrate()
243 * @param bitrate Target bitrate in bits/s.
247 * @retval -EINVAL if the requested bitrate or sample point is out of range.
248 * @retval -ENOTSUP if the requested bitrate is not supported.
253 uint32_t bitrate, uint16_t sample_pnt) in can_calc_timing_internal() argument
262 if (bitrate == 0 || sample_pnt >= 1000) { in can_calc_timing_internal()
[all …]
DKconfig27 int "Default CAN bitrate"
30 Default initial CAN bitrate in bits/s. This can be overridden per CAN controller using the
31 "bitrate" devicetree property.
34 int "Default CAN data phase bitrate"
38 Default initial CAN data phase bitrate in bits/s. This can be overridden per CAN controller
39 using the "bitrate-data" devicetree property.
Dcan_shell.c377 shell_print(sh, "max bitrate: %d bps", bitrate_max); in cmd_can_show()
440 uint32_t bitrate; in cmd_can_bitrate_set() local
449 bitrate = (uint32_t)strtoul(argv[2], &endptr, 10); in cmd_can_bitrate_set()
451 shell_error(sh, "failed to parse bitrate"); in cmd_can_bitrate_set()
462 err = can_calc_timing(dev, &timing, bitrate, sample_pnt); in cmd_can_bitrate_set()
465 "bitrate %d bps, sample point %d.%d%% (err %d)", in cmd_can_bitrate_set()
466 bitrate, sample_pnt / 10, sample_pnt % 10, err); in cmd_can_bitrate_set()
479 shell_print(sh, "setting bitrate to %d bps, sample point %d.%d%% " in cmd_can_bitrate_set()
481 bitrate, sample_pnt / 10, sample_pnt % 10, err / 10, err % 10, in cmd_can_bitrate_set()
494 shell_print(sh, "setting bitrate to %d bps", bitrate); in cmd_can_bitrate_set()
[all …]
Dcan_handlers.c11 uint32_t bitrate, uint16_t sample_pnt) in z_vrfy_can_calc_timing() argument
19 err = z_impl_can_calc_timing(dev, &res_copy, bitrate, sample_pnt); in z_vrfy_can_calc_timing()
83 uint32_t bitrate, uint16_t sample_pnt) in z_vrfy_can_calc_timing_data() argument
91 err = z_impl_can_calc_timing_data(dev, &res_copy, bitrate, sample_pnt); in z_vrfy_can_calc_timing_data()
195 static inline int z_vrfy_can_set_bitrate(const struct device *dev, uint32_t bitrate) in z_vrfy_can_set_bitrate() argument
199 return z_impl_can_set_bitrate(dev, bitrate); in z_vrfy_can_set_bitrate()
/Zephyr-latest/tests/drivers/can/timing/src/
Dmain.c28 /** Bitrate in bit/s */
29 uint32_t bitrate; member
66 * @brief Assert that a CAN timing struct matches the specified bitrate
68 * Assert that the values of a CAN timing struct matches the specified bitrate
73 * @param bitrate the CAN bitrate in bit/s
76 uint32_t bitrate) in assert_bitrate_correct() argument
89 zassert_equal(bitrate, bitrate_calc, "bitrate mismatch"); in assert_bitrate_correct()
146 * returns true if bitrate was supported, false otherwise
157 printk("testing bitrate %u, sample point %u.%u%%: ", in test_timing_values()
158 test->bitrate, test->sp / 10, test->sp % 10); in test_timing_values()
[all …]
/Zephyr-latest/doc/hardware/peripherals/can/
Dshell.rst63 below. The properties include the core CAN clock rate, the maximum supported bitrate, the number of
71 max bitrate: 5000000 bps
104 initial timing is set according to the ``bitrate``, ``sample-point``, ``bitrate-data``, and
110 The classic CAN bitrate/CAN FD arbitration phase bitrate can be configured using the ``can bitrate``
111 subcommand as shown below. The bitrate is specified in bits per second.
115 uart:~$ can bitrate can@0 125000
116 setting bitrate to 125000 bps
118 If :kconfig:option:`CONFIG_CAN_FD_MODE` is enabled, the data phase bitrate can be configured using
119 the ``can dbitrate`` subcommand as shown below. The bitrate is specified in bits per second.
124 setting data bitrate to 1000000 bps
/Zephyr-latest/boards/shields/mcp2515/
Ddfrobot_can_bus_v2_0.overlay20 min-bitrate = <60000>;
21 max-bitrate = <1000000>;
/Zephyr-latest/drivers/peci/
Dpeci_ite_it8xxx2.c34 /* The following constants describes the bitrate of it8xxx2 PECI,
41 /* The following masks are designed for the PECI bitrate settings,
103 uint32_t bitrate; member
156 static int peci_it8xxx2_configure(const struct device *dev, uint32_t bitrate) in peci_it8xxx2_configure() argument
165 data->bitrate = bitrate; in peci_it8xxx2_configure()
170 switch (bitrate) { in peci_it8xxx2_configure()
183 LOG_ERR("[PECI] Error: Specified Bitrate Not Supported\r\n"); in peci_it8xxx2_configure()
185 data->bitrate = PECI_IT8XXX2_BITRATE_1MHZ; in peci_it8xxx2_configure()
Dpeci_handlers.c12 uint32_t bitrate) in z_vrfy_peci_config() argument
16 return z_impl_peci_config(dev, bitrate); in z_vrfy_peci_config()
/Zephyr-latest/include/zephyr/drivers/
Dcan.h234 * bitrate calculation functions.
252 * 1 time quantum (tq) has the length of 1/(core_clock / prescaler). The bitrate
340 /** The minimum bitrate supported by the CAN controller/transceiver combination. */
342 /** The maximum bitrate supported by the CAN controller/transceiver combination. */
344 /** Initial CAN classic/CAN FD arbitration phase bitrate. */
345 uint32_t bitrate; member
351 /** Initial CAN FD data phase bitrate. */
360 * @param _min_bitrate minimum bitrate supported by the CAN controller
361 * @param _max_bitrate maximum bitrate supported by the CAN controller
368 .bitrate = DT_PROP_OR(node_id, bitrate, \
[all …]
Dpeci.h249 typedef int (*peci_config_t)(const struct device *dev, uint32_t bitrate);
269 * @param bitrate the selected bitrate expressed in Kbps.
274 __syscall int peci_config(const struct device *dev, uint32_t bitrate);
277 uint32_t bitrate) in z_impl_peci_config() argument
282 return api->config(dev, bitrate); in z_impl_peci_config()
/Zephyr-latest/tests/drivers/can/host/
DREADME.rst25 the ``bitrate`` and ``bitrate-data`` CAN controller devicetree properties if needed. Default
27 phase when using bitrate switching (BRS).
98 sudo ip link set can0 type can restart-ms 1000 bitrate 125000 dbitrate 1000000 fd on

123456