fread blocks on device data read?
freakforever at gmail.com
Tue Aug 17 16:13:09 UTC 2010
read() is not working as well with the uart in interrupt mode. It blocks the
same way as fread. I have set the termios parameters the same way as in the
RTEMS version with the uarts in polling mode so this is not the cause. What
can i be missing? Any suspicious configuration?
I'm configuring RTEMS with
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (10*1024)
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 8
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 8
#define CONFIGURE_MAXIMUM_POSIX_KEYS 5
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 5
#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 8
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 8
On Tue, Aug 17, 2010 at 5:00 PM, Eric Norum <wenorum at lbl.gov> wrote:
> On Aug 17, 2010, at 8:56 AM, João Rasta wrote:
> > You mean setting termios struct and use tcsetattr() to set the
> parameters? tcsetattr() only accepts the file descriptor ID as an int, not a
> FILE * pointer which is returned by fopen()..
> In many cases you're better off using the low level open/read/write calls
> with serial ports anyway since the buffering performed by the stdio routines
> just gets in the way.
> > Anyway it was working with the uart in polling mode so it should work
> also in interrupt mode without changing any RTEMS parameter right?
> I don't know enough about the implementation of the serial port driver to
> answer this.
> Eric Norum
> wenorum at lbl.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users