Forum Discussion
Altera_Forum
Honored Contributor
12 years agonios rs232 uart reads only last byte
Hi, I'm using rs232 uart in nios. I'm using the open and read functions to recive data from the uart. I'm using the serial port monitor in order to send data on rs232 from the computer to t...
Altera_Forum
Honored Contributor
12 years agoHi, yes.
The problem I had is that I used breakpoints. My guess is that in that case when the first byte arraived the software stopped at the breakpoint while the hardware kept on recieving additional bytes. So, the counter of the software did not go on but the hardware updated the current byte as new bytes arrived so only the last byte was kept at the register in the end of the process. The code is the usual code that is shared usually here, I just can't copy it at the moment. Just don't use breakpoints and you'll be fine. If you want to "samplew" the progress of your software then try writing somethings to the uart.