- void InitDebug(void)
- {
- #ifdef ITM_DEBUG_OUT
- #else
- GPIO_SetFunc(49, 1);
- GPIO_SetFunc(50, 1);
- CKGEN_Enable(DEBUG_UART_CLK, 1);
- CKGEN_SoftReset(DEBUG_UART_SRST, 1);
- UART_SetDivisor(DEBUG_UART, APB_BUS_FREQ / 16.0 / 115200); //apbbus: 48M
- UART_SetDataBits(DEBUG_UART, 8);
- UART_SetStopBit(DEBUG_UART, 1);
- UART_EnableTX(DEBUG_UART, 1);
- UART_EnableRX(DEBUG_UART, 1);
- UART_Set2ByteFIFO(DEBUG_UART, 1);
- UART_SetIntEn(DEBUG_UART, 9);
- #endif
- s_debugInit = 1;
- }
比如,这里的49、50是不是就是指的第49脚和第50脚?
GPIO_SetFunc(49, 1);
GPIO_SetFunc(50, 1);
|