Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUART Core with CTS/RTS
In a working design I configured my UART core so that it uses CTS/RTS. But I do not get a simple design running that shall only send integers from a Windws hyperterminal to via the Nios core an...
Altera_Forum
Honored Contributor
21 years agouse a terminal program (e.g. BRAY's TERMINAL) where you can switch on/off
RTS and where you can see the state of CTS. see file altera_avalon_uart_regs.h you can check CTS at nios side with... uartstatus=IORD_ALTERA_AVALON_UART_STATUS(UART_1_BASE); if(uartstatus&ALTERA_AVALON_UART_STATUS_CTS_MSK) { ... // cts is set (low) } you can set RTS with ... ctrl=IORD_ALTERA_AVALON_UART_CONTROL(UART_1_BASE); ctrl|=ALTERA_AVALON_UART_CONTROL_RTS_MSK; // ctrl&=~ALTERA_AVALON_UART_CONTROL_RTS_MSK; // to clear IOWR_ALTERA_AVALON_UART_CONTROL(UART_1_BASE,ctrl) if CTS is not set, the fast driver will not send any byte, RTS is ignored by the driver, you have to handle it by yourself.