I have faced another strange thing today: inside ISR of EXTI I wanted to send some character to USART, but I found that program halts there, after eliminating the commands regarding USART I found that program waits to reset USART_FLAG_TXE, but the flag remains in set mode. when I eliminated below command, program runs forward how ever just the last character transferred.
while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET)
Why TXE flag could not become reset after transfer of the character?!
Yes you are right, checking TXE before sending is true. I handled the problem in another way, I set a flag in the EXTI ISR and checked it inside while loop in main.c and executed the sending chars there, so now I have no problems anymore.