Serial port issues
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Aug 8 05:52:34 UTC 2019
On 07/08/2019 23:13, Michel Macena wrote:
> just to update, I've tried different ways to get something from the
> serial port.
> when i use open (from unistd.h) to open the serial port it returns "-1".I
> also tried the getchark() function from
> https://github.com/RTEMS/rtems/tree/master/cpukit/libcsupport/src
> repository but it also returns "-1". I forgot to say before but I'am
> using a board that was that
> has two UART channels, Channel A for console e and Channel B for debugging.
> I load the programs and send the command to execute through GDB connect
> to the port B.
> I get the board responses in the channel A. I can make the board print
> properly in console (ch A) but when
> I ask to getc(), getchark(),fgets() or scanf() it does not get the
> character or string.
The problem is that the console driver uses the polled mode. If no char
is available it calls rtems_task_wake_after(). This function never
returns since you disabled the clock driver. Try to use this:
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
RTEMS without a clock driver is a very unusual configuration.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list