This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A really strange problem using serial port....


Arif.Abbas@combitechsystems.com wrote:
> 
> I thought that maybe it's the Baudrate etc which could be wrong. So I
> included the following after the Lookup:
> 
>         //Set up device
> //      ser_info.baud = CYGNUM_SERIAL_BAUD_38400;
> //      ser_info.stop = CYGNUM_SERIAL_STOP_1;
> //      ser_info.parity = CYGNUM_SERIAL_PARITY_EVEN;
> //      ser_info.word_length = CYGNUM_SERIAL_WORD_LENGTH_8;
> //      ser_info.flags = CYG_SERIAL_FLAGS_DEFAULT;
> 
> //      config_len = sizeof(ser_info);
> 
> //      err = cyg_io_set_config(serial_handle,
> //              CYG_IO_SET_CONFIG_SERIAL_INFO,
> //              &ser_info,&config_len);
> //      if (ENOERR != err) {
> //              serial_handle = 0; //ERROR
> //      }
> 
> But when I did this, I saw in the debugger that the execution gets "stuck"
> at the line where I say:
> err =
> cyg_io_set_config(serial_handle,CYG_IO_SET_CONFIG_SERIAL_INFO,&ser_info,&con
> fig_len);
> 
> I am really confused. Could someone please help me with this problem?
> I mean, if COM2 is NOT connected ( error in the eCos "binding") I should not
> get an OK flag
> from the two methods??? The same goes if COM2 is not Physically connected???

By the fact that it gets stuck when setting the baud rate I get the feeling
you are using the same port for debugging as your output. You can't use the
same channel. From my reading of the sources the GDB channel is the one
connected to UART1, which is /dev/ser1. Try /dev/ser0.

Also check your PC isn't using flow control or anything.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]