[Bug 1548] New: ERC32 console stops working when UART error flags are set

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Jun 9 13:41:30 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1548

           Summary: ERC32 console stops working when UART error flags are
                    set
           Product: RTEMS
           Version: HEAD
          Platform: sparc
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: bsps
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: glpuga at gmail.com


Problem: 

The console works fine when only transmitting data from the ERC32, but stops
working after a while when receiving data. 

"Stops working" means, bytes are neither sent nor received from the UART, but
the rest of the system keeps functioning (task are executing, the operative
system is responsive, etc). 

Context:

Working with RTEMS 4.8, and compiling the OS with the option
CONSOLE_USE_INTERRUPTS.

I haven't compiled RTEMS 4.10 from the cvs, but I saw the code for the HEAD
revision and saw there are significant changes to the console driver. 
However, the code seems to have the same bug. 

I tracked the problem and found that:

- When an RX error occurs, the ERC32 UARTS stop generating RX/TX interrupts
until the corresponding error flag in the UART_STATUS are cleared. 

- The console.c code currently cleans the error flags from the console_isr_x
subroutines, but those are NOT called when an RX error occurs. Thus the error
flag is never cleaned and then the UARTs stop generating interrupts
indefinitely.

- The ERC32 UARTs generate a different interrupt when an RX error occurs. 

I solved the problem by:

- Adding a third interrupt service routine console_isr_error to handle the
UART_ERROR trap. This isr cleans the error flags of the channels. 

- Cleaning the error flags manually just after having initialized the interrupt
vectors. This is because if the error flag was already set by the time the
interrupt vectors are configured, the interrupts might never be called.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list