碰到一个奇怪的问题
int main(void)
{
USART_Config();
ADS7843_Init();
while (1);
}
为什么我一注销串口配置USART_Config();程序就进入外部中断出不来?两个函数如下:
void ADS7843_Init(void)
{
ADS7843_CS_config(); // 使能LCD
ADS7843_CS_HIGH() ; // 关闭LCD
SPI1_Config();
SPI1_MOSI_HIGH();
SPI1_SCK_LOW();
ADS7843_INT_config();
ADS7843_INT_EXIT_Init();
ADS7843_InterruptConfig();
}
void USART_Config(void)
{
USART_InitTypeDef USART_InitStructure;
USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
STM_EVAL_COMInit(COM1, &USART_InitStructure);
}
路过的给点建议啊
此帖出自
小平头技术问答
一周热门 更多>