This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial interface HANGS!

Hi everybody. I need some help with the serial interface. The transmission is giving me no problems, but the reception is hanging my software.

In the register S0CON (Serial configuration register) I enable the Baud Rate Generator, select 8 bit asynchronous tramsmission but leave the "Enable Receiver" bit off (because I don't want to receive anything at the moment). Both pins for receive and transmit have bit defined Input, output accordingly. Anyway, when I trasmit there is no problem, but when I turn this "enable receiver" bit on my software hangs. At the beginning I thought it was the Loopback function so I put it away, it was not that, then I thought it was the interrupt function with the trap number so I put this interrupt function as a comment and still crashed.

Does anybody have an idea what may be causing the problem?

PLEASE HELP!
Thanks
Ernesto Garcia

Parents Reply Children
  • Hi, thx both of u. Neil e, I would be interested in your app notes and help or advices you may have. My email address is:
    ernesto.garcia.gomez@ge.com

    The SW is not hanging anymore. The problem was in the SFR file provided by infineon. The trap number for the Serial interruption was not the correct one. But I am still having some problems debugging.

    First of all I tried to use the Loopback function (since the product is far from finished) because I have no other way of testing. Well if I understood correctly all the Loopback function does (quoting directly from the manual) is: "allows the data currently being transmitted to be received simultaneously in the receive buffer". So I guess I won't get a receive interrupt. But anyway, I tried to read the S0RBUF (receive buffer) and still I can't do a thing.

    Any ideas?

    Thanks in advance.
    Ernesto

  • I intermixed the platforms (C51 vs C166). Take a look to the Getting Started User's Guide, Using On-Chip Peripherals, Serial Interface.