Home
last modified time | relevance | path

Searched refs:baudRate_Bps (Results 1 – 25 of 50) sorted by relevance

12

/hal_nxp-2.7.6/mcux/drivers/kinetis/
Dfsl_lpsci.c216 assert(config->baudRate_Bps); in LPSCI_Init()
231 baudDiff = config->baudRate_Bps; in LPSCI_Init()
235 sbrTemp = (srcClock_Hz / (config->baudRate_Bps * osrTemp)); in LPSCI_Init()
244 tempDiff = calculatedBaud - config->baudRate_Bps; in LPSCI_Init()
247 if (tempDiff > (config->baudRate_Bps - (srcClock_Hz / (osrTemp * (sbrTemp + 1))))) in LPSCI_Init()
249 tempDiff = config->baudRate_Bps - (srcClock_Hz / (osrTemp * (sbrTemp + 1))); in LPSCI_Init()
263 if (baudDiff > ((config->baudRate_Bps / 100) * 3)) in LPSCI_Init()
343 config->baudRate_Bps = 115200U; in LPSCI_GetDefaultConfig()
350 status_t LPSCI_SetBaudRate(UART0_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in LPSCI_SetBaudRate() argument
352 assert(baudRate_Bps); in LPSCI_SetBaudRate()
[all …]
Dfsl_uart.c216 assert(config->baudRate_Bps != 0U); in UART_Init()
227 sbr = srcClock_Hz / (config->baudRate_Bps * 16U); in UART_Init()
239 uint32_t brfa = (2U * srcClock_Hz / (config->baudRate_Bps)) - 32U * sbr; in UART_Init()
244 …(tempBaud > config->baudRate_Bps) ? (tempBaud - config->baudRate_Bps) : (config->baudRate_Bps - te… in UART_Init()
248 baudDiff = (srcClock_Hz / (sbr * 16U)) - config->baudRate_Bps; in UART_Init()
251 if (baudDiff > (config->baudRate_Bps - (srcClock_Hz / (16U * ((uint32_t)sbr + 1U))))) in UART_Init()
253 baudDiff = config->baudRate_Bps - (srcClock_Hz / (16U * ((uint32_t)sbr + 1U))); in UART_Init()
260 if (baudDiff > ((config->baudRate_Bps / 100U) * 3U)) in UART_Init()
404 config->baudRate_Bps = 115200U; in UART_GetDefaultConfig()
437 status_t UART_SetBaudRate(UART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in UART_SetBaudRate() argument
[all …]
Dfsl_lpuart.c243 assert(0U < config->baudRate_Bps); in LPUART_Init()
261 baudDiff = config->baudRate_Bps; in LPUART_Init()
267 … sbrTemp = (uint16_t)((srcClock_Hz * 10U / (config->baudRate_Bps * (uint32_t)osrTemp) + 5U) / 10U); in LPUART_Init()
275 … tempDiff = calculatedBaud > config->baudRate_Bps ? (calculatedBaud - config->baudRate_Bps) : in LPUART_Init()
276 (config->baudRate_Bps - calculatedBaud); in LPUART_Init()
288 if (baudDiff > ((config->baudRate_Bps / 100U) * 3U)) in LPUART_Init()
523 config->baudRate_Bps = 115200U; in LPUART_GetDefaultConfig()
561 status_t LPUART_SetBaudRate(LPUART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in LPUART_SetBaudRate() argument
563 assert(0U < baudRate_Bps); in LPUART_SetBaudRate()
577 baudDiff = baudRate_Bps; in LPUART_SetBaudRate()
[all …]
Dfsl_spi.c405 config->baudRate_Bps = 500000U; in SPI_MasterGetDefaultConfig()
444 SPI_MasterSetBaudRate(base, config->baudRate_Bps, srcClock_Hz); in SPI_MasterInit()
614 void SPI_MasterSetBaudRate(SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in SPI_MasterSetBaudRate() argument
624 uint32_t freq = baudRate_Bps; in SPI_MasterSetBaudRate()
Dfsl_i2c.c595 I2C_MasterSetBaudRate(base, masterConfig->baudRate_Bps, srcClock_Hz); in I2C_MasterInit()
660 masterConfig->baudRate_Bps = 100000U; in I2C_MasterGetDefaultConfig()
768 void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in I2C_MasterSetBaudRate() argument
795 …absError = baudRate_Bps > computedRate ? (baudRate_Bps - computedRate) : (computedRate - baudR… in I2C_MasterSetBaudRate()
813 g_baudrate = baudRate_Bps; in I2C_MasterSetBaudRate()
Dfsl_flexio_i2c_master.h84 uint32_t baudRate_Bps; /*!< Baud rate in Bps. */ member
278 void FLEXIO_I2C_MasterSetBaudRate(FLEXIO_I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_H…
Dfsl_lpsci.h156 uint32_t baudRate_Bps; /*!< LPSCI baud rate */ member
275 status_t LPSCI_SetBaudRate(UART0_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz);
Dfsl_flexio_spi.h125 uint32_t baudRate_Bps; /*!< Baud rate in Bps. */ member
469 void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz…
Dfsl_spi.h194 uint32_t baudRate_Bps; /*!< Baud Rate for SPI in Hz */ member
487 void SPI_MasterSetBaudRate(SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz);
Dfsl_flexio_i2c_master.c574 timerDiv = (uint16_t)(srcClock_Hz / masterConfig->baudRate_Bps) / 2U - 1U; in FLEXIO_I2C_MasterInit()
694 masterConfig->baudRate_Bps = 100000U; in FLEXIO_I2C_MasterGetDefaultConfig()
793 void FLEXIO_I2C_MasterSetBaudRate(FLEXIO_I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_H… in FLEXIO_I2C_MasterSetBaudRate() argument
799 timerDiv = (uint16_t)((srcClock_Hz / baudRate_Bps) / 2U - 1U); in FLEXIO_I2C_MasterSetBaudRate()
Dfsl_flexio_spi.c274 timerDiv = (uint16_t)(srcClock_Hz / masterConfig->baudRate_Bps); in FLEXIO_SPI_MasterInit()
346 masterConfig->baudRate_Bps = 500000U; in FLEXIO_SPI_MasterGetDefaultConfig()
643 void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz) in FLEXIO_SPI_MasterSetBaudRate() argument
650 timerDiv = (uint16_t)(srcClockHz / baudRate_Bps); in FLEXIO_SPI_MasterSetBaudRate()
/hal_nxp-2.7.6/mcux/drivers/imx/
Dfsl_lpuart.c243 assert(0U < config->baudRate_Bps); in LPUART_Init()
261 baudDiff = config->baudRate_Bps; in LPUART_Init()
267 … sbrTemp = (uint16_t)((srcClock_Hz * 10U / (config->baudRate_Bps * (uint32_t)osrTemp) + 5U) / 10U); in LPUART_Init()
275 … tempDiff = calculatedBaud > config->baudRate_Bps ? (calculatedBaud - config->baudRate_Bps) : in LPUART_Init()
276 (config->baudRate_Bps - calculatedBaud); in LPUART_Init()
288 if (baudDiff > ((config->baudRate_Bps / 100U) * 3U)) in LPUART_Init()
523 config->baudRate_Bps = 115200U; in LPUART_GetDefaultConfig()
561 status_t LPUART_SetBaudRate(LPUART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in LPUART_SetBaudRate() argument
563 assert(0U < baudRate_Bps); in LPUART_SetBaudRate()
577 baudDiff = baudRate_Bps; in LPUART_SetBaudRate()
[all …]
Dfsl_flexio_uart.c188 timerDiv = (uint16_t)(srcClock_Hz / userConfig->baudRate_Bps); in FLEXIO_UART_Init()
203 diff = calculatedBaud - userConfig->baudRate_Bps; in FLEXIO_UART_Init()
204 if (diff > ((userConfig->baudRate_Bps / 100U) * 3U)) in FLEXIO_UART_Init()
302 userConfig->baudRate_Bps = 115200U; in FLEXIO_UART_GetDefaultConfig()
Dfsl_flexio_i2c_master.h83 uint32_t baudRate_Bps; /*!< Baud rate in Bps. */ member
277 void FLEXIO_I2C_MasterSetBaudRate(FLEXIO_I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_H…
Dfsl_flexio_mculcd.h132 uint32_t baudRate_Bps; /*!< Baud rate in Bps. */ member
362 status_t FLEXIO_MCULCD_SetBaudRate(FLEXIO_MCULCD_Type *base, uint32_t baudRate_Bps, uint32_t srcClo…
Dfsl_flexio_mculcd.c66 if (kStatus_Success != FLEXIO_MCULCD_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz)) in FLEXIO_MCULCD_Init()
112 config->baudRate_Bps = 96000000U; in FLEXIO_MCULCD_GetDefaultConfig()
124 status_t FLEXIO_MCULCD_SetBaudRate(FLEXIO_MCULCD_Type *base, uint32_t baudRate_Bps, uint32_t srcClo… in FLEXIO_MCULCD_SetBaudRate() argument
131 baudRatePerDataLine = baudRate_Bps / (uint32_t)FLEXIO_MCULCD_DATA_BUS_WIDTH; in FLEXIO_MCULCD_SetBaudRate()
Dfsl_flexio_spi.h125 uint32_t baudRate_Bps; /*!< Baud rate in Bps. */ member
469 void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz…
/hal_nxp-2.7.6/mcux/drivers/imxrt6xx/
Dfsl_usart.c242 if ((9600U % config->baudRate_Bps) == 0U) in USART_Init()
244 base->BRG = 9600U / config->baudRate_Bps; in USART_Init()
253 result = USART_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz); in USART_Init()
310 config->baudRate_Bps = 115200U; in USART_GetDefaultConfig()
425 status_t USART_Enable32kMode(USART_Type *base, uint32_t baudRate_Bps, bool enableMode32k, uint32_t … in USART_Enable32kMode() argument
432 if ((9600U % baudRate_Bps) == 0U) in USART_Enable32kMode()
434 base->BRG = 9600U / baudRate_Bps - 1U; in USART_Enable32kMode()
444 result = USART_SetBaudRate(base, baudRate_Bps, srcClock_Hz); in USART_Enable32kMode()
Dfsl_i2c.c222 masterConfig->baudRate_Bps = 100000U; in I2C_MasterGetDefaultConfig()
244 I2C_MasterSetBaudRate(base, masterConfig->baudRate_Bps, srcClock_Hz); in I2C_MasterInit()
309 void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in I2C_MasterSetBaudRate() argument
324 best_scl = 8000000U / baudRate_Bps; in I2C_MasterSetBaudRate()
326 if ((8000000U / best_scl - baudRate_Bps) > (baudRate_Bps - (8000000U / (best_scl + 1U)))) in I2C_MasterSetBaudRate()
336 …if ((best_scl > 18U) || ((best_scl < 4U)) || ((baudRate_Bps == 400000U) && (srcClock_Hz / best_div… in I2C_MasterSetBaudRate()
345 if ((srcClock_Hz / mindivider / baudRate_Bps) < 4U) in I2C_MasterSetBaudRate()
347 mindivider = srcClock_Hz / 4U / baudRate_Bps; in I2C_MasterSetBaudRate()
354 scl = ((srcClock_Hz * 10U) / (divider * baudRate_Bps) + 5U) / 10U; in I2C_MasterSetBaudRate()
360 err = srcClock_Hz - (baudRate_Bps * scl * divider); in I2C_MasterSetBaudRate()
/hal_nxp-2.7.6/mcux/drivers/lpc/
Dfsl_usart.c242 if ((9600U % config->baudRate_Bps) == 0U) in USART_Init()
244 base->BRG = 9600U / config->baudRate_Bps; in USART_Init()
253 result = USART_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz); in USART_Init()
310 config->baudRate_Bps = 115200U; in USART_GetDefaultConfig()
425 status_t USART_Enable32kMode(USART_Type *base, uint32_t baudRate_Bps, bool enableMode32k, uint32_t … in USART_Enable32kMode() argument
432 if ((9600U % baudRate_Bps) == 0U) in USART_Enable32kMode()
434 base->BRG = 9600U / baudRate_Bps - 1U; in USART_Enable32kMode()
444 result = USART_SetBaudRate(base, baudRate_Bps, srcClock_Hz); in USART_Enable32kMode()
Dfsl_i2c.c222 masterConfig->baudRate_Bps = 100000U; in I2C_MasterGetDefaultConfig()
244 I2C_MasterSetBaudRate(base, masterConfig->baudRate_Bps, srcClock_Hz); in I2C_MasterInit()
309 void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in I2C_MasterSetBaudRate() argument
324 best_scl = 8000000U / baudRate_Bps; in I2C_MasterSetBaudRate()
326 if ((8000000U / best_scl - baudRate_Bps) > (baudRate_Bps - (8000000U / (best_scl + 1U)))) in I2C_MasterSetBaudRate()
336 …if ((best_scl > 18U) || ((best_scl < 4U)) || ((baudRate_Bps == 400000U) && (srcClock_Hz / best_div… in I2C_MasterSetBaudRate()
345 if ((srcClock_Hz / mindivider / baudRate_Bps) < 4U) in I2C_MasterSetBaudRate()
347 mindivider = srcClock_Hz / 4U / baudRate_Bps; in I2C_MasterSetBaudRate()
354 scl = ((srcClock_Hz * 10U) / (divider * baudRate_Bps) + 5U) / 10U; in I2C_MasterSetBaudRate()
360 err = srcClock_Hz - (baudRate_Bps * scl * divider); in I2C_MasterSetBaudRate()
/hal_nxp-2.7.6/mcux/drivers/imx8/
Dfsl_uart.c241 else if (config->baudRate_Bps != 0U) in UART_Init()
246 if (kStatus_Success != UART_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz)) in UART_Init()
309 config->baudRate_Bps = 115200U; in UART_GetDefaultConfig()
344 status_t UART_SetBaudRate(UART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in UART_SetBaudRate() argument
357 denominator = baudRate_Bps << 4U; in UART_SetBaudRate()
368 denominator = (baudRate_Bps << 4U) / divisor; in UART_SetBaudRate()
434 baudDiff = (baudDiff >= (uint64_t)baudRate_Bps) ? (baudDiff - (uint64_t)baudRate_Bps) : in UART_SetBaudRate()
435 ((uint64_t)baudRate_Bps - baudDiff); in UART_SetBaudRate()
437 if (baudDiff < ((uint64_t)baudRate_Bps / 100UL * 3UL)) in UART_SetBaudRate()
Dfsl_ecspi.c248 config->baudRate_Bps = 500000; in ECSPI_MasterGetDefaultConfig()
302 ECSPI_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz); in ECSPI_MasterInit()
400 void ECSPI_SetBaudRate(ECSPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in ECSPI_SetBaudRate() argument
425 if (realBaudrate > baudRate_Bps) in ECSPI_SetBaudRate()
427 diff = realBaudrate - baudRate_Bps; in ECSPI_SetBaudRate()
437 diff = baudRate_Bps - realBaudrate; in ECSPI_SetBaudRate()
Dfsl_i2c.c497 I2C_MasterSetBaudRate(base, masterConfig->baudRate_Bps, srcClock_Hz); in I2C_MasterInit()
540 masterConfig->baudRate_Bps = 100000U; in I2C_MasterGetDefaultConfig()
589 void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz) in I2C_MasterSetBaudRate() argument
601 …absError = baudRate_Bps > computedRate ? (baudRate_Bps - computedRate) : (computedRate - baudR… in I2C_MasterSetBaudRate()
Dfsl_i2c.h93 uint32_t baudRate_Bps; /*!< Baud rate configuration of I2C peripheral. */ member
410 void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz);

12