Possible incorrect errors check in mpc5200_psc_interrupt_handler()
Aleksandr Platonov
pam at wolpike.com
Tue Dec 24 07:45:54 UTC 2013
Hi.
In mpc5200_psc_interrupt_handler()
(c/src/lib/libbsp/powerpc/gen5200/console/console.c) errors check is the
following:
|isr = psc->isr_imr;|
.....
|if(isr & ISR_ERROR)|
|{|
|if(isr & ISR_RB)|
| channel_info[minor].breaks_detected++;|
|if(isr & ISR_FE)|
| channel_info[minor].framing_errors++;|
|if(isr & ISR_PE)|
| channel_info[minor].parity_errors++;|
|if(isr & ISR_OE)|
| channel_info[minor].overrun_errors++; |
...
However (according with c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h):
1) #define ISR_ERROR (ISR_FE | ISR_PE | ISR_OE)
so (ISR_ERROR & ISR_RB) == false. Is it OK?
2) According with MPC5200b user's manual (chapter 15.2.2.11) bits ISR_PE
and ISR_FE are reserved
for ISR register (|psc->isr_imr|). Should not we check SR register
(chapter 15.2.2.3; psc->sr_csr) bits here instead?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20131224/c540281c/attachment.html>
More information about the devel
mailing list