MC09S08DZ60 OR and RDRF flag reset

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC09S08DZ60 OR and RDRF flag reset

509件の閲覧回数
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!

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 返信

396件の閲覧回数
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 件の賞賛
返信