/****************************************************************************** ** Public Function Definitions ** ******************************************************************************/ void UART001_Init(void) { /* Reset the Peripheral*/ RESET001_DeassertReset(PER0_USIC0); UART001_lInit(&UART001_Handle0); /* Configuration of TX Pin 1.5 based on User configuration */ /* PDR_PD = 0 */ PORT1->PDR0 &= (~(PORT1_PDR0_PD5_Msk)); /* Configuration of RX Pin 1.4 based on User configuration */ }
/****************************************************************************** ** Public Function Definitions ** ******************************************************************************/ void UART001_Init(void) { /* Disable the USIC0 clock gating */ /* * The disabling of the clock gating is applicable only for * XMC4400, XMC4200 and XMC1000 devices. */ SCU_GENERAL->PASSWD = 0x000000C0UL; WR_REG(SCU_CLK->CLKCR, SCU_CLK_CLKCR_CNTADJ_Msk, \ SCU_CLK_CLKCR_CNTADJ_Pos,CLK002_DELAYCNT); SET_BIT(SCU_CLK->CGATCLR0, SCU_CLK_CGATCLR0_USIC0_Pos); while ((SCU_CLK->CLKCR)&(SCU_CLK_CLKCR_VDDC2LOW_Msk)) { ; } SCU_GENERAL->PASSWD = 0x000000C3UL; UART001_lInit(&UART001_Handle0); /* Configuration of TX Pin 1.3 based on User configuration */ /* Configuration of RX Pin 1.2 based on User configuration */ }