Hello~all,thanks for reading my thread.I met some troubles in the process of operating STM32F103C8T6,here this is the STM32F103C8T6's datasheet. does anyone here can help me out?
The program is as following:
void USART1_IRQHandler(void) //串口1中断函数
if(USART1->SR & 0x00000020)//检查指定的USART中断发生与否
Receie_data[iPose]=USART1->DR & (uint16_t)0x01FF;//读取接收到的数据
USART1->DR = (flag & (uint16_t)0x01FF);
while((USART1->SR&0x00000040) == 0);//准备发送一个数据
When I operated the program in the STM32,the reactive data which were reviewed shows normal.However,It always can’t review that “flag==1”.What’s odd,the ninth digital of reactive data from series shows “flag=1”. According to its situation,I change another SCM to have a try,it’s normal in the first programming while there always display that the “flag=1” from the second time.
Why? How to solve this problems? Please help me !
Thank you in advance!