EmbeddedRelated.com
Forums

Address mark wakeup messages not being recognized

Started by garyolmstead August 3, 2007
I am using the 9S12A32 serial port and I want to use address mark
wake up. I have set the SCI for 9 bits, one stop bit, no parity,
interrupts on, transmitter and receiver on, address mark wakeup. I
am manually setting (and later clearing) bit 8 in SCIDRH.

Using the True Time Real Time Debugger, I can see characters coming
into the receive buffer, but the interrupt is never triggered, and
the characters are never recognized. If I disable address mark
wakeup, the interrupt is triggered, and all characters are read
properly.

One thing that I noticed is that in the receiver, the ninth bit does
not appear to ever be set in SCIDRH. This is odd, because if I
monitor the transmitter, it is set in the register SCIDRH.

I must be missing something, probably something embarassingly
obvious. Any suggestions?

Gary Olmstead
Toucan Technology
Ventura CA
Gary,
>I am using the 9S12A32 serial port and I want to use address mark
> wake up. I have set the SCI for 9 bits, one stop bit, no parity,
> interrupts on, transmitter and receiver on, address mark wakeup. I
> am manually setting (and later clearing) bit 8 in SCIDRH.
T8 bit in SCIDRH, counting from zero, is bit 6 (mask 0x40), counting from 1
it's bit 7.

If it was just a typo and you indeed are using SCIDRH bit6(0x40) for T8 then
I don't know what could be the problem. Defective maskset? I can only
confirm that for example on quite old D64 2L86D 9bit address mark wakeup
works as expected.

Regards
Edward
>
> Using the True Time Real Time Debugger, I can see characters coming
> into the receive buffer, but the interrupt is never triggered, and
> the characters are never recognized. If I disable address mark
> wakeup, the interrupt is triggered, and all characters are read
> properly.
>
> One thing that I noticed is that in the receiver, the ninth bit does
> not appear to ever be set in SCIDRH. This is odd, because if I
> monitor the transmitter, it is set in the register SCIDRH.
>
> I must be missing something, probably something embarassingly
> obvious. Any suggestions?
>
> Gary Olmstead
> Toucan Technology
> Ventura CA
Hi,
What I understand you have problems on receiver side. But:
Setting the receiver wakeup bit, RWU, in SCI control register
2 (SCICR2) puts the receiver into standby state during _which receiver
interrupts are disabled_.The SCI will
still load the receive data into the SCIDRH/L registers, but _it will
not set_ the RDRF flag.
The WAKE bit in SCI control register 1 (SCICR1) determines how the SCI
is brought out of the standby
state to process an incoming message. The WAKE bit enables either idle
line wakeup or address mark
wakeup.
Hope this will help.
Regards,
Yoan

Edward Karpicz wrote:
>
> Gary,
>
> >I am using the 9S12A32 serial port and I want to use address mark
> > wake up. I have set the SCI for 9 bits, one stop bit, no parity,
> > interrupts on, transmitter and receiver on, address mark wakeup. I
> > am manually setting (and later clearing) bit 8 in SCIDRH.
>
> T8 bit in SCIDRH, counting from zero, is bit 6 (mask 0x40), counting
> from 1
> it's bit 7.
>
> If it was just a typo and you indeed are using SCIDRH bit6(0x40) for
> T8 then
> I don't know what could be the problem. Defective maskset? I can only
> confirm that for example on quite old D64 2L86D 9bit address mark wakeup
> works as expected.
>
> Regards
> Edward
>
> >
> > Using the True Time Real Time Debugger, I can see characters coming
> > into the receive buffer, but the interrupt is never triggered, and
> > the characters are never recognized. If I disable address mark
> > wakeup, the interrupt is triggered, and all characters are read
> > properly.
> >
> > One thing that I noticed is that in the receiver, the ninth bit does
> > not appear to ever be set in SCIDRH. This is odd, because if I
> > monitor the transmitter, it is set in the register SCIDRH.
> >
> > I must be missing something, probably something embarassingly
> > obvious. Any suggestions?
> >
> > Gary Olmstead
> > Toucan Technology
> > Ventura CA
>
>