Ok 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.