[En-Nut-Discussion] UART1 on ethernut3

Ole Reinhardt ole.reinhardt at embedded-it.de
Fri Feb 6 18:38:03 CET 2009


Hi!

>     // UART1
>     assign P22  = ( rsc_reg[7] & rsc_reg[6]) ? CRD : 1'bz;
>     assign P22  = (~rsc_reg[7] & rsc_reg[6]) ? CDSR : 1'bz;
>     assign CTD  = ( rsc_reg[7] & rsc_reg[6]) ? P21 : 1'bz;
>     //assign CDTR_buf = (~rsc_reg[7] & rsc_reg[6]) ? P21 : 1'bz;

You can do so simply using Software. If the UART1 port is enabled, it
will use the DTR line for the transmitter and the DSR line for the
receiver. So you can access both UARTs on the sub-d9 connector.

This is the command you need to enable the secondary UART:

outb(NPL_RSCR, inb(NPL_RSCR) | NPL_RSUS0E | NPL_RSUS1E);

Now you can 

NutRegisterDevice(&DEV_UART1, 0, 0);

and open it as usual.

See also: http://www.ethernut.de/en/hardware/enut3/memory.html

Regards,

Ole Reinhardt 

-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list