MC09S08DZ60 OR and RDRF flag reset

cancel
Showing results for 
Search instead for 
Did you mean: 

MC09S08DZ60 OR and RDRF flag reset

171 Views
xiffer
Contributor I

Hello,

I'm new to the S08 micros and am trying to receive information per SCI. I got the problem that the OR flag is 1 right after the startup. When trying to clear the flag as described in the Datasheet (first read SCIxS1, then read SCIxD) the OR flag still stays 1. From another question I got the idea to also read the 9th databit, eventhough using 8bit mode, but that didn't make any difference. The mc is working in normal mode and any interrupts are disabled, using polling for the receive data flag. The Does anyone have similar problems or can give me an example code of a working SCI communiction?

 

The second problem is probably caused by the first, so when receiving data the RDRF flag doesn't get set, I checked the information arrives at the rx pin by capturing the voltage on that pin.

 

Thank you!

Labels (1)
Tags (4)
0 Kudos
1 Reply

58 Views
xiffer
Contributor I

I found the problem: when setting a breakpoint the mc reads the current values of the registers and is obviously changing some flags... so by reading the statusregisters before the breakpoint and storing them in a variable you get the actual values of the registers. They are just as expected, but I spent several hours on this problem where there actually is no problem:smileyangry: but its good to know

0 Kudos