Forum Discussion
Altera_Forum
Honored Contributor
21 years agoMultiple serial port misbehavior
Quartus 4.1, Nios1.01: The NiosII system has 2 uarts, a primary debug terminal@115K baud, and a secondary half-duplex slave [email protected] baud. During operation lots of printf output (from ...
Altera_Forum
Honored Contributor
21 years agoFixed it.
The problem was accessing using the same r/w file ptr from two different async tasks. Incomming data was getting mixed with outgoing data within the low-level file management block. Fischer's suggestion of opening the file twice seems to be the cleanest solution. With fread(),fwrite(), no further exclusion or synchronization appears needed.