Forum Discussion
Altera_Forum
Honored Contributor
21 years agoOne thing should be pointed out is, the application echo you are using put an extra '\n' at the end with a seperate write operation, therefore, there are actually two characters sent in your example. This is also the reason why you see rs_write twice.
My guess is, if you want to send X characters, the function transmit_chars will be called roughly X+1 times (one extra to disable TX interrupt when no data to send). You can easily test this with a command like "$echo 123456789 >/dev/ttyS1". For a uart with one character buffer, this is nearly the best it can do. But if you have a FIFO, you can make the hardware to generate a TX interrupt when at least a certian proportion of the FIFO is empty, and let transmit_chars send more than one characters each time, then you will see less TX interrupts.