Has anyone gotten multiple UARTs to work in a single system?
My default debug/diagnostics UART works fine when mapped to "/dev/haldiag", but I have two other UARTs in the system which aren't working using the cyg_io functions.
In the nios2configtool I have TTY mode channel# 0 mapped to "/dev/uart_rtd" and TTY mode channel# 1 mapped to "/dev/uart_radio". When I do the lookup for "/dev/tty0" I receive no error, but then the processor resets somewhere inside the cyg_io_read() function.
Am I missing something?
void cyg_user_start(void)
{
cyg_io_handle_t uart_rtd_handle;
Cyg_ErrNo error;
char readbuf;
cyg_uint32 readbuf_size = 1;
cyg_io_init();
error = cyg_io_lookup("/dev/tty0", &uart_rtd_handle);
out_str("Error 1 = ");
out_hex(error);
while(!error)
{
error = cyg_io_read(uart_rtd_handle, (void *)&readbuf, &readbuf_size);
out_hex(readbuf);
out_char(' ');
}
}