linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Moloko Vellocet <allanjos@gmail.com>
To: linuxppc-embedded@ozlabs.org
Subject: MPC5200 - Problem with PSC mode
Date: Sat, 28 Jan 2006 19:02:51 -0400	[thread overview]
Message-ID: <7a2435710601281502k2b302ea2mfa73033fe7062a32@mail.gmail.com> (raw)

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 =3D in_be32(&gpio->port_config);
val32 &=3D ~0x700;
val32 |=3D 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 =3D in_be16(&psc->mpc5xxx_psc_imr);

val16 =3D 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)

             reply	other threads:[~2006-01-28 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-28 23:02 Moloko Vellocet [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-30 14:18 MPC5200 - Problem with PSC mode Zeitler, Nathan
2006-01-30 19:30 ` Moloko Vellocet
2006-01-30 22:34 Zeitler, Nathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a2435710601281502k2b302ea2mfa73033fe7062a32@mail.gmail.com \
    --to=allanjos@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).