[En-Nut-Discussion] Again hardware handshake

Ole Reinhardt ole.reinhardt at kernelconcepts.de
Wed Sep 15 12:03:11 CEST 2004


Hi,

I still have problems with my RTS / CTS lines... I have them configured
as like this in include/cfg/modem.h and also have set the config options
in Nutconf to the same values.

#define UART0_RTS_PORT  PORTE
#define UART0_RTS_DDR   DDRE
#define UART0_RTS_BIT   3
#define UART0_CTS_PORT   PORTE
#define UART0_CTS_PIN    PINE
#define UART0_CTS_DDR    DDRE
#define UART0_CTS_SIGNAL sig_INTERRUPT4
#define UART0_CTS_BIT    4

To initialize the uart I use:

NutRegisterDevice(&devUsartAvr0, 0, 0);
uart = fopen("uart0", "r+b");
_ioctl(_fileno(uart), UART_SETSPEED, &sysconfig.serial.baudrate);

flow_control = USART_MF_CTSSENSE | USART_MF_RTSCONTROL;
_ioctl(_fileno(uart),  UART_SETFLOWCONTROL, &flow_control);

I have connected my board to my Linux box with minicom. Hardware
handshake on the PC is enabled.

I can now send data from my board to the pc, but I'm not able to send
data from the pc to the board anymore. The rts line of my board is
allways set to high (PortE / 3)...

Does anybody has a suggestions where to search next?

PS: The board has a female sub-d 9 RS232 connector and a 1:1 link to my
PC. The connector has the following pin assignment:

pin 2: txd
pin 3: rxd
pin 7: cts
pin 8: rts


Regards,

Ole Reinhardt

-- 
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--





More information about the En-Nut-Discussion mailing list