Home
last modified time | relevance | path

Searched refs:u32ClkDiv (Results 1 – 16 of 16) sorted by relevance

/hal_nuvoton-3.7.0/m46x/StdDriver/src/
Dusci_uart.c329 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_Open() local
374 u32ClkDiv = u32Div / u32DSCnt; in UUART_Open()
376 if(u32ClkDiv > 0x400ul) in UUART_Open()
378 u32ClkDiv = 0x400ul; in UUART_Open()
379 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
384 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
385 u32Tmp2 = ((u32ClkDiv+1ul) * u32DSCnt) - u32Div; in UUART_Open()
390 u32ClkDiv = u32ClkDiv + 1ul; in UUART_Open()
398 u32MinClkDiv = u32ClkDiv; in UUART_Open()
494 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_SetLine_Config() local
[all …]
Dusci_spi.c45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local
56u32ClkDiv = (uint32_t)((((((u32Pclk / 2ul) * 10ul) / (u32BusClock)) + 5ul) / 10ul) - 1ul); /* Comp… in USPI_Open()
92 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_Open()
97 u32UspiClk = (uint32_t)(u32Pclk / ((u32ClkDiv + 1ul) << 1)); in USPI_Open()
167 uint32_t u32ClkDiv; in USPI_SetBusClock() local
175u32ClkDiv = (uint32_t)((((((u32Pclk / 2ul) * 10ul) / (u32BusClock)) + 5ul) / 10ul) - 1ul); /* Comp… in USPI_SetBusClock()
179 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_SetBusClock()
181 return (u32Pclk / ((u32ClkDiv + 1ul) << 1)); in USPI_SetBusClock()
192 uint32_t u32ClkDiv; in USPI_GetBusClock() local
194 u32ClkDiv = (uspi->BRGEN & USPI_BRGEN_CLKDIV_Msk) >> USPI_BRGEN_CLKDIV_Pos; in USPI_GetBusClock()
[all …]
Dclk.c56 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En) in CLK_EnableCKO() argument
59 … CLK->CLKOCTL = CLK_CLKOCTL_CLKOEN_Msk | (u32ClkDiv) | (u32ClkDivBy1En << CLK_CLKOCTL_DIV1EN_Pos); in CLK_EnableCKO()
350 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetHCLK() argument
374 CLK->CLKDIV0 = (CLK->CLKDIV0 & (~CLK_CLKDIV0_HCLKDIV_Msk)) | u32ClkDiv; in CLK_SetHCLK()
675 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetModuleClock() argument
703 …se EADC0_MODULE: CLK->CLKDIV0 = (CLK->CLKDIV0 & (~CLK_CLKDIV0_EADC0DIV_Msk)) | (u32ClkDiv); break; in CLK_SetModuleClock()
704 …se SDH0_MODULE: CLK->CLKDIV0 = (CLK->CLKDIV0 & (~CLK_CLKDIV0_SDH0DIV_Msk)) | (u32ClkDiv); break; in CLK_SetModuleClock()
705 …se SC0_MODULE: CLK->CLKDIV1 = (CLK->CLKDIV1 & (~CLK_CLKDIV1_SC0DIV_Msk)) | (u32ClkDiv); break; in CLK_SetModuleClock()
706 …se SC1_MODULE: CLK->CLKDIV1 = (CLK->CLKDIV1 & (~CLK_CLKDIV1_SC1DIV_Msk)) | (u32ClkDiv); break; in CLK_SetModuleClock()
707 …se SC2_MODULE: CLK->CLKDIV1 = (CLK->CLKDIV1 & (~CLK_CLKDIV1_SC2DIV_Msk)) | (u32ClkDiv); break; in CLK_SetModuleClock()
[all …]
Dusci_i2c.c37 uint32_t u32ClkDiv; in UI2C_Open() local
43u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_Open()
59 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
62 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_Open()
290 uint32_t u32ClkDiv; in UI2C_SetBusClockFreq() local
294u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_SetBusClockFreq()
298 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
300 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_SetBusClockFreq()
/hal_nuvoton-3.7.0/m2l31x/StdDriver/src/
Dusci_uart.c329 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_Open() local
381 u32ClkDiv = u32Div / u32DSCnt; in UUART_Open()
383 if(u32ClkDiv > 0x400ul) in UUART_Open()
385 u32ClkDiv = 0x400ul; in UUART_Open()
386 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
391 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
392 u32Tmp2 = ((u32ClkDiv + 1ul) * u32DSCnt) - u32Div; in UUART_Open()
397 u32ClkDiv = u32ClkDiv + 1ul; in UUART_Open()
405 u32MinClkDiv = u32ClkDiv; in UUART_Open()
502 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_SetLine_Config() local
[all …]
Dusci_spi.c45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local
60u32ClkDiv = (uint32_t) ((((((u32Pclk/2ul)*10ul)/(u32BusClock))+5ul)/10ul)-1ul); /* Compute proper … in USPI_Open()
96 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_Open()
101 u32UspiClk = (uint32_t)( u32Pclk / ((u32ClkDiv+1ul)<<1) ); in USPI_Open()
171 uint32_t u32ClkDiv; in USPI_SetBusClock() local
183u32ClkDiv = (uint32_t) ((((((u32Pclk/2ul)*10ul)/(u32BusClock))+5ul)/10ul)-1ul); /* Compute proper … in USPI_SetBusClock()
187 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_SetBusClock()
189 return ( u32Pclk / ((u32ClkDiv+1ul)<<1) ); in USPI_SetBusClock()
200 uint32_t u32ClkDiv; in USPI_GetBusClock() local
202 u32ClkDiv = (uspi->BRGEN & USPI_BRGEN_CLKDIV_Msk) >> USPI_BRGEN_CLKDIV_Pos; in USPI_GetBusClock()
[all …]
Dclk.c59 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En) in CLK_EnableCKO() argument
62 … CLK->CLKOCTL = CLK_CLKOCTL_CLKOEN_Msk | (u32ClkDiv) | (u32ClkDivBy1En << CLK_CLKOCTL_DIV1EN_Pos); in CLK_EnableCKO()
408 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetHCLK() argument
424 CLK->CLKDIV0 = (CLK->CLKDIV0 & (~CLK_CLKDIV0_HCLK0DIV_Msk)) | u32ClkDiv; in CLK_SetHCLK()
631 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetModuleClock() argument
674 M32(u32div) = (M32(u32div) & (~(u32mask << MODULE_CLKDIV_Pos(u32ModuleIdx)))) | u32ClkDiv; in CLK_SetModuleClock()
Dusci_i2c.c37 uint32_t u32ClkDiv; in UI2C_Open() local
49u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_Open()
65 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
68 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_Open()
304 uint32_t u32ClkDiv; in UI2C_SetBusClockFreq() local
316u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_SetBusClockFreq()
320 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
322 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_SetBusClockFreq()
/hal_nuvoton-3.7.0/m48x/StdDriver/src/
Dusci_uart.c329 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_Open() local
368 u32ClkDiv = u32Div / u32DSCnt; in UUART_Open()
370 if(u32ClkDiv > 0x400ul) in UUART_Open()
372 u32ClkDiv = 0x400ul; in UUART_Open()
373 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
378 u32Tmp = u32Div - (u32ClkDiv * u32DSCnt); in UUART_Open()
379 u32Tmp2 = ((u32ClkDiv+1ul) * u32DSCnt) - u32Div; in UUART_Open()
384 u32ClkDiv = u32ClkDiv + 1ul; in UUART_Open()
392 u32MinClkDiv = u32ClkDiv; in UUART_Open()
487 uint32_t u32PCLKFreq, u32PDSCnt, u32DSCnt, u32ClkDiv; in UUART_SetLine_Config() local
[all …]
Dusci_spi.c45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local
60u32ClkDiv = (uint32_t) ((((((u32Pclk/2ul)*10ul)/(u32BusClock))+5ul)/10ul)-1ul); /* Compute proper … in USPI_Open()
96 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_Open()
101 u32UspiClk = (uint32_t)( u32Pclk / ((u32ClkDiv+1ul)<<1) ); in USPI_Open()
171 uint32_t u32ClkDiv; in USPI_SetBusClock() local
183u32ClkDiv = (uint32_t) ((((((u32Pclk/2ul)*10ul)/(u32BusClock))+5ul)/10ul)-1ul); /* Compute proper … in USPI_SetBusClock()
187 uspi->BRGEN |= (u32ClkDiv << USPI_BRGEN_CLKDIV_Pos); in USPI_SetBusClock()
189 return ( u32Pclk / ((u32ClkDiv+1ul)<<1) ); in USPI_SetBusClock()
200 uint32_t u32ClkDiv; in USPI_GetBusClock() local
202 u32ClkDiv = (uspi->BRGEN & USPI_BRGEN_CLKDIV_Msk) >> USPI_BRGEN_CLKDIV_Pos; in USPI_GetBusClock()
[all …]
Dclk.c53 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En) in CLK_EnableCKO() argument
56 … CLK->CLKOCTL = CLK_CLKOCTL_CLKOEN_Msk | (u32ClkDiv) | (u32ClkDivBy1En << CLK_CLKOCTL_DIV1EN_Pos); in CLK_EnableCKO()
333 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetHCLK() argument
346 CLK->CLKDIV0 = (CLK->CLKDIV0 & (~CLK_CLKDIV0_HCLKDIV_Msk)) | u32ClkDiv; in CLK_SetHCLK()
503 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv) in CLK_SetModuleClock() argument
551 …M32(u32div) & (~(MODULE_CLKDIV_Msk(u32ModuleIdx) << MODULE_CLKDIV_Pos(u32ModuleIdx)))) | u32ClkDiv; in CLK_SetModuleClock()
Dusci_i2c.c36 uint32_t u32ClkDiv; in UI2C_Open() local
48u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_Open()
64 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
67 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_Open()
303 uint32_t u32ClkDiv; in UI2C_SetBusClockFreq() local
315u32ClkDiv = (uint32_t) ((((((u32Pclk/2U)*10U)/(u32BusClock))+5U)/10U)-1U); /* Compute proper divid… in UI2C_SetBusClockFreq()
319 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
321 return ( u32Pclk / ((u32ClkDiv+1U)<<1U) ); in UI2C_SetBusClockFreq()
/hal_nuvoton-3.7.0/m48x/StdDriver/inc/
Dclk.h670 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En);
680 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv);
681 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv);
/hal_nuvoton-3.7.0/m2l31x/StdDriver/inc/
Dclk.h748 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En);
758 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv);
759 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv);
/hal_nuvoton-3.7.0/dts/m46x/
Dclk.h1238 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En);
1248 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv);
1249 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv);
/hal_nuvoton-3.7.0/m46x/StdDriver/inc/
Dclk.h1208 void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv, uint32_t u32ClkDivBy1En);
1218 void CLK_SetHCLK(uint32_t u32ClkSrc, uint32_t u32ClkDiv);
1219 void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv);