MPC5200 - Problem with PSC mode

Moloko Vellocet allanjos at gmail.com
Sun Jan 29 10:02:51 EST 2006


Hi, I'm configuring a MPC5200 in PSC3 mode to communicate with a
telephony board that send information to the MPC5200 continuously. In
the osciloscope I see the signals comming via RX pin, but when I read
RX buffer it doesn't contain anything and when I write in the TX
buffer the flags show that buffer is not empty, but in the osciloscope
I don't see any signal in TX pin. I can't enable the interrupt mode
too.

Can anyone help me?

Part of the configuration code:

out_8(&psc->command, MPC5xxx_PSC_TX_DISABLE | MPC5xxx_PSC_RX_DISABLE);

val32 = in_be32(&gpio->port_config);
val32 &= ~0x700;
val32 |= 0x600;
out_be32(&gpio->port_config, val32);

out_8(&psc->command, MPC5xxx_PSC_RST_RX |
         MPC5xxx_PSC_RST_TX |
         MPC5xxx_PSC_SEL_MODE_REG_1 |
         MPC5xxx_PSC_RST_ERR_STAT);

out_be16(&psc->mpc5xxx_psc_imr, 0);

out_be16(&psc->rfalarm, 0x0004);

out_be16(&psc->tfalarm, 0x0004);

out_be32(&psc->sicr, 0x221000);

out_8(&psc->command, MPC5xxx_PSC_RST_RX |
         MPC5xxx_PSC_RST_TX |
         MPC5xxx_PSC_SEL_MODE_REG_1 |
         MPC5xxx_PSC_RST_ERR_STAT);

spin_lock_irqsave(&mpc5xxx_serial_lock, my_flags);

val16 = in_be16(&psc->mpc5xxx_psc_imr);

val16 = MPC5xxx_PSC_IMR_TXRDY | MPC5xxx_PSC_IMR_RXRDY;

out_be16(&psc->mpc5xxx_psc_imr, val16);

spin_unlock_irqrestore(&mpc5xxx_serial_lock, my_flags);

out_8(&psc->command, MPC5xxx_PSC_RX_ENABLE | MPC5xxx_PSC_TX_ENABLE);


So.. with this I tried to read the RX and write in TX buffer.




Thank you.




--
_______________________________
Allann J. O. Silva

"I received the fundamentals of my education in school, but that was
not enough. My real education, the superstructure, the details, the
true architecture, I got out of the public library. For an
impoverished child whose family could not afford to buy books, the
library was the open door to wonder and achievement, and I can never
be sufficiently grateful that I had the wit to charge through that
door and make the most of it." (from I. Asimov, 1994)



More information about the Linuxppc-embedded mailing list