I am using internitche OS on M52235EVB and still have lot of uart problems.
1. I remake iuart.c to support rs485
2. i am using uart0 and uart1 only but after heavy load (stress test on uart0) i got interrupt on UART2 if using both uarts at same time.
3. UART2 interrupts are disabled all time and MCF_INTC_IMRL_INT_MASK15 is allways high, but when interrupts starts running interrupts can not be turned off and slow down whole processor by huge factor and evetualy hangs. Interrupt flag remain disabled.
Why do i get unstoppable uart interrupts whit no flags on uart2?
- this interrupt crash gets hooked just after mcf5xxx_irq_enable() in main, (thus there is no reason for memory leaks in my part of code)
- there is communication on uart1 during power on becuse EVB works like slave
- if there is no communication on uart1 there is no problem.
OK!
I just can not beleave!!!!
If there are both uart0 and uart1 interrupts at same time uart2 get called (i am dead serous as far as I can see)
so this trick save me weeks of debugging and weard baehavour!
__interrupt__ voiduart2_isr(void){ if(MCF_INTC0_IPRL&MCF_INTC_IPRL_INT13) uart_isr(0); if(MCF_INTC0_IPRL&MCF_INTC_IPRL_INT14) uart_isr(1); if(MCF_INTC0_IPRL&MCF_INTC_IPRL_INT15) uart_isr(2);}