2018-04-20 04:37 AM
Solved! Go to Solution.
2018-04-24 12:07 AM
I found the problem. The SysTick interrupt is causing that problem. I disabled irqs with '__disable_irq();' before sending command and read all the response data without problem then enabled irqs with '__enable_irq();' after got the response. Now it is working. Thanks.
2018-04-20 04:44 AM
Don't inspect the USART peripheral registers in the debugger, it will break things. Have your code provide telemetry via SWV
Make sure no other errors are flagging while spinning on RXNE, specifically Framing or Parity, as these will need to be cleared before the receiver will work again.
2018-04-20 06:53 AM
Thanks Clive One. No, code have not provide telemtry via SWV. But now I edited the question (because I pressed CTRL + S this is routine for me sorry.). There is an ORE error in the first byte but no other errors.
I'm just putting a breakpoint to the timeout condition returning and the next line of the while { ... } block. It never pass the while. Every time it falls into the timeout condition. Just for try, I put one more breakpoint to line that reading the DR to see what's happening in the registers.
2018-04-24 12:07 AM
I found the problem. The SysTick interrupt is causing that problem. I disabled irqs with '__disable_irq();' before sending command and read all the response data without problem then enabled irqs with '__enable_irq();' after got the response. Now it is working. Thanks.