int32_t main (void)
{
// extern uint32_t SystemFrequency;
STR_UART_T sParam;
UNLOCKREG();
/* Ñ¡ÔñÄÚ²¿22MʼÖÕ*/
DrvSYS_SetOscCtrl(E_SYS_OSC22M, 1);
// DrvSYS_GetPLLContent();
/* Enable PLL */
DrvSYS_SetPLLMode(0);
/* Switch to PLL clock */
DrvSYS_SelectHCLKSource(7);
LOCKREG();
/* Set UART0 Pin */
DrvGPIO_InitFunction(E_FUNC_UART1);
/* UART Setting */
sParam.u32BaudRate = 9600;
sParam.u8cDataBits = DRVUART_DATABITS_8;
sParam.u8cStopBits = DRVUART_STOPBITS_1;
sParam.u8cParity = DRVUART_PARITY_NONE;
sParam.u8cRxTriggerLevel= DRVUART_FIFO_1BYTES;
/* Select UART Clock Source From 12Mhz*/
DrvSYS_SelectIPClockSource(E_SYS_UART_CLKSRC,3);
/* Set UART0 Configuration */
DrvUART_Open(UART_PORT1, &sParam);
// outp32(&SYSCLK->APBCLK, 0x08010000);
while(1)
{
printf("nihao\r\n");
//Delay(10000);
}
}
然后一直卡死在 while(UART1->FSR.TX_FULL == 1); 求助,,, |