Forum Discussion
Altera_Forum
Honored Contributor
15 years agoUart data ready
Hi all, I am periodically sending data from LabView to my cycloneIII development kit (bemicro) and I want to check if there is data available to be read in NIOS II. Unfortunately, I have not be...
Altera_Forum
Honored Contributor
15 years agoAh aH :-)
(You can enclose your code with ... ) Try if (IORD_ALTERA_AVALON_UART_STATUS(UART_BASE) & ALTERA_AVALON_UART_STATUS_RRDY_MSK) // be coherent
{
status = IORD_ALTERA_AVALON_UART_STATUS(UART_BASE); // status=64 means "TRDY=1" and that is normal.
// IOWR(UART_BASE,0x01, status);
IOWR_ALTERA_AVALON_UART_TXDATA(UART_BASE,status); // status is 16-bit wide , OK
} For reference , http://www.altera.com/literature/ug/ug_embedded_ip.pdf (UART CORE REGISTER MAP en page 79) I may laugh if since the beginning, your are looking for the wrong register bit : trdy instead of rrdy :-d My teacher would says "Fatal Error" and give 0 point to the whole exam ! :-) On an other side, # include "system.h" // doesn't mean that system.h matches to SOPC, even if system.h exists and makes no software build error. You could have an working system.h but very old and not matching.