USART_InitStructure.USART_BaudRate = 9600; USART_InitStructure.USART_WordLength = USART_WordLength_9b;//传送9位数据 USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_Even ; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
我做偶校验 我在中断里读取 if(USART_GetITStatus(USART1, USART_IT_PE) == SET) { USART_ClearITPendingBit(USART1, USART_IT_PE); } 为什么发的没有校验,或者是奇校验,这个PE一直是0啊? 根本就没有判断 下边是进入中断的数据,这次校验应该是错误的
|