Altera_Forum
Honored Contributor
20 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 and back to the hyperterminal. I have double-checked that the CTS/RTS-pins are connected as stated in the Stratix II development board, which I am using. Also I have the same baud rate (115200). On the hyperterminal I have selected "Flow Control: Hardware". However, nothing happens. Can somebody help? Below is the code of my program, which works without CTS/RTS - Hardware Flow Control. # include <stdio.h># include "system.h"# include "alt_types.h"# include <time.h># include <sys/alt_timestamp.h> int main() { int x; FILE* infile; FILE* outfile; infile = fopen("/dev/uart1", "r"); outfile = fopen("/dev/uart1", "w"); printf("System ready!\n"); fprintf(outfile, "System ready!\n\r"); while(1) { // fprintf(outfile,"New Number: "); if (fscanf(infile, "%d", &x)) { fprintf(outfile, "Received: %d\r\n", x); printf("Received: %d\r\n", x); } } return 0; }