Home
last modified time | relevance | path

Searched refs:sbr (Results 1 – 3 of 3) sorted by relevance

/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/uart/
Dfsl_uart.c222 uint32_t sbr = 0U; in UART_Init() local
227 sbr = srcClock_Hz / (config->baudRate_Bps * 16U); in UART_Init()
229 if (sbr == 0U) in UART_Init()
231 sbr = 1U; in UART_Init()
239 uint32_t brfa = (2U * srcClock_Hz / (config->baudRate_Bps)) - 32U * sbr; in UART_Init()
242 tempBaud = srcClock_Hz * 2U / (sbr * 32U + brfa); 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()
254 sbr++; in UART_Init()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/lpsci/
Dfsl_lpsci.c219 uint16_t sbr = 0; in LPSCI_Init() local
257 sbr = sbrTemp; /* update store the best SBR value calculated*/ in LPSCI_Init()
289 base->BDH = ((base->C4 & ~UART0_BDH_SBR_MASK) | (uint8_t)(sbr >> 8)); in LPSCI_Init()
290 base->BDL = (uint8_t)sbr; in LPSCI_Init()
355 uint32_t osr = 0, sbr = 0; in LPSCI_SetBaudRate() local
390 sbr = sbrTemp; /* update store the best SBR value calculated*/ in LPSCI_SetBaudRate()
416 base->BDH = ((base->C4 & ~UART0_BDH_SBR_MASK) | (uint8_t)(sbr >> 8)); in LPSCI_SetBaudRate()
417 base->BDL = (uint8_t)sbr; in LPSCI_SetBaudRate()
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/lpuart/
Dfsl_lpuart.c311 uint16_t sbr, sbrTemp; in LPUART_Init() local
323 sbr = 0U; in LPUART_Init()
350 sbr = sbrTemp; /* update store the best SBR value calculated */ in LPUART_Init()
402 base->BAUD = temp | LPUART_BAUD_SBR(sbr); in LPUART_Init()
639 uint16_t sbr, sbrTemp; in LPUART_SetBaudRate() local
651 sbr = 0U; in LPUART_SetBaudRate()
678 sbr = sbrTemp; /* update store the best SBR value calculated */ in LPUART_SetBaudRate()
711 base->BAUD = temp | LPUART_BAUD_SBR(sbr); in LPUART_SetBaudRate()