[En-Nut-Discussion] UART0 receive problem

Bernd Walter enut at cicely.de
Thu Jun 11 13:06:31 CEST 2009


On Thu, Jun 11, 2009 at 02:12:18PM +0800, Prasad.Nagapati at infineon.com wrote:
>  
> Hi Harald,
> 
> As you mentioned I am using UART1 now, and connected it to directly the
> smart card I/O line which operates at +5V.
> Smart card settings are 9600, 8 data bit, Even parity, 1 stop bit. Even
> I configured the same in my code also.
> 
> But I am getting random data, what could be the reason, do I need an
> inverter before connecting to the Rx of UART1?

Random data ist usually a problem of false settings.
A scope is a good tool to find out if timing and levels are Ok.
Parity can be difficult to verify unless you send single
characters.

I never saw the requirement for an inverter.
All devices normaly agree that high level is idle.
So you should measure 5V is nothing is send.
Some devices however disable their driver in some situations to
allow multiple slaves.
Therefor it is usually a good idea to enable the pull-up on the RX line.

Normaly I programm the uart myself and don't use Ethernet code
for it, so I can comment on your code.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list