Home
last modified time | relevance | path

Searched refs:osrTemp (Results 1 – 4 of 4) sorted by relevance

/hal_nxp-latest/mcux/mcux-sdk/drivers/lpsci/
Dfsl_lpsci.c222 uint32_t osrTemp; in LPSCI_Init() local
232 for (osrTemp = 4; osrTemp <= 32; osrTemp++) in LPSCI_Init()
235 sbrTemp = (srcClock_Hz / (config->baudRate_Bps * osrTemp)); in LPSCI_Init()
242 calculatedBaud = (srcClock_Hz / (osrTemp * sbrTemp)); 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()
256 osr = osrTemp; /* update and store the best OSR value calculated*/ in LPSCI_Init()
356 uint8_t osrTemp; in LPSCI_SetBaudRate() local
365 for (osrTemp = 4; osrTemp <= 32; osrTemp++) in LPSCI_SetBaudRate()
368 sbrTemp = (srcClock_Hz / (baudRate_Bps * osrTemp)); in LPSCI_SetBaudRate()
[all …]
/hal_nxp-latest/mcux/mcux-sdk/drivers/lpflexcomm/lpuart/
Dfsl_lpuart.c285 uint8_t osr, osrTemp; in LPUART_Init() local
297 for (osrTemp = 4U; osrTemp <= 32U; osrTemp++) in LPUART_Init()
300 … sbrTemp = (uint16_t)((srcClock_Hz * 2U / (config->baudRate_Bps * (uint32_t)osrTemp) + 1U) / 2U); in LPUART_Init()
315 calculatedBaud = (srcClock_Hz / ((uint32_t)osrTemp * (uint32_t)sbrTemp)); in LPUART_Init()
322 osr = osrTemp; /* update and store the best OSR value calculated */ in LPUART_Init()
623 uint8_t osr, osrTemp; in LPUART_SetBaudRate() local
635 for (osrTemp = 4U; osrTemp <= 32U; osrTemp++) in LPUART_SetBaudRate()
638 sbrTemp = (uint16_t)((srcClock_Hz * 2U / (baudRate_Bps * (uint32_t)osrTemp) + 1U) / 2U); in LPUART_SetBaudRate()
654 calculatedBaud = srcClock_Hz / ((uint32_t)osrTemp * (uint32_t)sbrTemp); in LPUART_SetBaudRate()
661 osr = osrTemp; /* update and store the best OSR value calculated */ in LPUART_SetBaudRate()
/hal_nxp-latest/mcux/mcux-sdk/drivers/lpuart/
Dfsl_lpuart.c371 uint8_t osr, osrTemp; in LPUART_Init() local
383 for (osrTemp = 4U; osrTemp <= 32U; osrTemp++) in LPUART_Init()
386 … sbrTemp = (uint16_t)((srcClock_Hz * 2U / (config->baudRate_Bps * (uint32_t)osrTemp) + 1U) / 2U); in LPUART_Init()
401 calculatedBaud = (srcClock_Hz / ((uint32_t)osrTemp * (uint32_t)sbrTemp)); in LPUART_Init()
408 osr = osrTemp; /* update and store the best OSR value calculated */ in LPUART_Init()
703 uint8_t osr, osrTemp; in LPUART_SetBaudRate() local
715 for (osrTemp = 4U; osrTemp <= 32U; osrTemp++) in LPUART_SetBaudRate()
718 sbrTemp = (uint16_t)((srcClock_Hz * 2U / (baudRate_Bps * (uint32_t)osrTemp) + 1U) / 2U); in LPUART_SetBaudRate()
733 calculatedBaud = srcClock_Hz / ((uint32_t)osrTemp * (uint32_t)sbrTemp); in LPUART_SetBaudRate()
740 osr = osrTemp; /* update and store the best OSR value calculated */ in LPUART_SetBaudRate()
/hal_nxp-latest/mcux/mcux-sdk/drivers/lin/
Dfsl_lin_lpuart.c154 uint32_t osrTemp, tempDiff, calculatedBaud, baudDiff; in LIN_LPUART_CalculateBaudRate() local
163 for (osrTemp = 4U; osrTemp <= 32U; osrTemp++) in LIN_LPUART_CalculateBaudRate()
166 sbrTemp = (uint16_t)(srcClock_Hz / (baudRate_Bps * osrTemp)); in LIN_LPUART_CalculateBaudRate()
173 calculatedBaud = (srcClock_Hz / (osrTemp * sbrTemp)); in LIN_LPUART_CalculateBaudRate()
178 if (tempDiff > (baudRate_Bps - (srcClock_Hz / (osrTemp * ((uint32_t)sbrTemp + 1U))))) in LIN_LPUART_CalculateBaudRate()
180 tempDiff = baudRate_Bps - (srcClock_Hz / (osrTemp * ((uint32_t)sbrTemp + 1U))); in LIN_LPUART_CalculateBaudRate()
187 *osr = osrTemp; /* update and store the best OSR value calculated */ in LIN_LPUART_CalculateBaudRate()