Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12434 Discussions

Bug in altera_16550_uart_init.c (altera_16550_uart_init function)

Altera_Forum
Honored Contributor II
931 Views

Hello, 

 

I had a problem with interrupt handling with the 16550 core. 

Presumably a programming error in the C code of the component: 

The uart did not process receive interrupts properly from the start. 

What follows is an exact copy of the nios code for the uart: 

 

altera_16550_uart_init.c line 439: 

/* enable interrupts at the device */ 

regs = iord_altera_16550_uart_ier(sp->base); 

regs |= altera_16550_uart_ier_erbfi_msk | altera_16550_uart_ier_etbei_msk; 

iowr_altera_16550_uart_ier(base, sp->ctrl); 

 

 

Should be: 

 

altera_16550_uart_init.c line 439: 

/* enable interrupts at the device */ 

sp->ctrl = iord_altera_16550_uart_ier(sp->base); 

sp->ctrl |= altera_16550_uart_ier_erbfi_msk | altera_16550_uart_ier_etbei_msk; 

iowr_altera_16550_uart_ier(base, sp->ctrl); 

 

 

=> reading the interrupt enable register, modifying the read contents and then writing the result back using a different value does not make sense. 

 

Best Regards, 

Johi.
0 Kudos
0 Replies
Reply