Bad break char sent by SCI on AP32

Discussion created by STEFANO QUADRI on May 29, 2008
Latest reply on May 30, 2008 by bigmac
Hi all,

I'm facing the following problem.
I use SCI on AP32 for a packet communication on RS485.
Cpu clock is produced by the PLL with an external 32kHz crystal.
Bus clock is 7372800Hz.
Baud rate is 38400 (26us/bit)
The start of packet is marked by a break character.
When I start the transmisison of a packet I do the following
1) enable tx driver and disable rx receiver on RS485 driver.
2) disable reception on SCI SCC2 = 0x08 (TE bit is always setted)
3) trigger break transmission: SCC2 = 0x09 (TE=1, SBK = 1) then SCC2 = 0x48 (TE = 1, SBK = 0, TCIE = 1)

What I see is that the break character on TxD pin stay low level for 247us instead of 260us (Start+8bit+stop, a half bit period missed) and the receiver doesn't recognize the break so it does not start packet parsing. On the following packet bytes the duration of bits is correct (26us).
Furthermore, the other unit on the RS485 bus transmits similar packets in the opposite direction using the the same uC (AP32) but using IRSCI module and with the same register config sequence, in this case producing a well timed break character on TxD pin.

Do anyone see something wrong in what I do or do you know different procedure to send a break char?

Thanks a lot.