Forum Discussion
Altera_Forum
Honored Contributor
12 years agoISR driven UART is missing characters (even at 9600bps... same prob at 230400)
Any ideas on what I'm missing here that is causing me to miss characters? I'm interfacing to a device that shoots out RS232 packets (up to 200 per second if the bps can handle itI can select t...
Altera_Forum
Honored Contributor
12 years agoI have the same problem with that code in 'run' or 'debug' mode.
Using the UART with FIFOs from the wiki pages and putting a 512char buffer on it solves the problem... and I swapped to just polling the RXRDY flag in a background loop... when now there's only like 800 'events' and no ISR overhead. I'm getting all the characters and still have quite a bit of idle time on the processor. whereas before it was always overwhelmed by ISR calls... even at 9600bps... The design now runs flawlessly at 230400bps. I was reading somewhere that the NIOS2 is actually quite slow compared to a lot of the MCU's that I'm used to using... ISR response on the order of 200 clocks vs much lower latency for things like AVR/PIC/TMS/etc... So, it would seem like I've re-discovered the wheel. I just can't believe that the ISR performance would be so terrible though...