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
19 years agoOk I find THE solution: RST/CTS flow control works well. This my code:
int main() { char* msg = "Detected the character 't'.\n"; FILE* fp; char prompt = 0; fp = fopen("/dev/uart", "r+"); unsigned int uart_status; unsigned int uart_ctrl; if(fp) { while(prompt != 'v') { prompt = getc(fp); if(prompt == 't') { fwrite(msg, strlen(msg), 1, fp); } } fprintf(fp, "Closing the UART file.\n"); fclose(fp); } return(0); } This code works under Hyper Terminal with "hardware" flow control. I found the error. It iwas an Altera error. You just have to change : CTS: PIN L15 (instead of PIN K15) RTS: PIN K15 (instead of PIN L15) for the Altera DSP Stratix II Evaluation Board.