Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUART with macros IORD_..._UART_STATUS
Hello. I seek to use the macros like IORD_ALTERA_AVALON_UART_STATUS(base). My code is : void uart1_init(void) { int data_uart ; ... alt_irq_register(UART1...
Altera_Forum
Honored Contributor
21 years agoThis looks correct to me.
The UART registers are native bus aligned, so are at offsets which are multiples of the data width (0, 4, 8, etc). The STATUS register is register number 2, so should be at offset 8, which is the location the assembler code is reading from.