/hal_nuvoton-3.7.0/m46x/StdDriver/src/ |
D | usci_uart.c | 329 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 …]
|
D | usci_spi.c | 45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local 56 …u32ClkDiv = (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 175 …u32ClkDiv = (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 …]
|
D | clk.c | 56 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 …]
|
D | usci_i2c.c | 37 uint32_t u32ClkDiv; in UI2C_Open() local 43 …u32ClkDiv = (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 294 …u32ClkDiv = (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/ |
D | usci_uart.c | 329 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 …]
|
D | usci_spi.c | 45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local 60 …u32ClkDiv = (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 183 …u32ClkDiv = (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 …]
|
D | clk.c | 59 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()
|
D | usci_i2c.c | 37 uint32_t u32ClkDiv; in UI2C_Open() local 49 …u32ClkDiv = (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 316 …u32ClkDiv = (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/ |
D | usci_uart.c | 329 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 …]
|
D | usci_spi.c | 45 uint32_t u32ClkDiv = 0ul; in USPI_Open() local 60 …u32ClkDiv = (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 183 …u32ClkDiv = (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 …]
|
D | clk.c | 53 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()
|
D | usci_i2c.c | 36 uint32_t u32ClkDiv; in UI2C_Open() local 48 …u32ClkDiv = (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 315 …u32ClkDiv = (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/ |
D | clk.h | 670 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/ |
D | clk.h | 748 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/ |
D | clk.h | 1238 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/ |
D | clk.h | 1208 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);
|