2019-03-12 05:08 AM
In USART2 interrupt service routine ISR is read
isrval = USART2->ISR;
Stopping at breakpoint just before this statement, Keil debugger shows ISR value 0x000000F8.
Stepping one step (to read this ISR), value in ISR changes to 0x000000D8.
But, what ist this: 'isrval' is also 0x000000D8!!!.
This means RXNE flag is lost(!), in ISR AND in isrval and cannot further be evaluated.
Any suggestions
Solved! Go to Solution.
2019-03-12 05:14 AM
> This means RXNE flag is lost(!), in ISR AND in isrval and cannot further be evaluated.
Yes, of course.
The debugger is not a magic device.
It updates the RDR register view, too, and thereby clears the RXNE flag.
The only solution - don't single-step through the evaluation, set a breakpoint afterwards.
2019-03-12 05:14 AM
> This means RXNE flag is lost(!), in ISR AND in isrval and cannot further be evaluated.
Yes, of course.
The debugger is not a magic device.
It updates the RDR register view, too, and thereby clears the RXNE flag.
The only solution - don't single-step through the evaluation, set a breakpoint afterwards.
2019-03-12 05:43 AM
Oh yes, thank you, understood (and your suggestion works...)