I have a board with an MCF52254 MCU running MQX 4.2. There is a UART port exposed for an optional peripheral and it was running as a polled serial port with no issues except it would sometimes miss characters so it was changed to an interrupt-based UART. That works fine as long as something is connected to the port, however when disconnected the application sometimes locks up. I found that even touching the RX pin can lead the device to lock up sometimes.
To confirm, I switched back to polling and I can't reproduce the lock up. It only happens when configured for interrupts. If I connect a terminal to it, it doesn't reproduce, so I feel the 'floating' RX pin is picking up noise leading to the issue. I was able to narrow the lock-ups down to whenever there is some output produced on the same UART port, but again only when nothing is connected to it. (I assume there is some crosstalk from the TX output back onto the RX input when terminated.) It only happens rarely, maybe 1 in every ~50 times it's operated, unless I touch the pin which makes it happen somewhat more often.
If I add a pull-up on the RX pin I can't reproduce it, but I don't think I can turn on a internal pull-up on the pin when it's in UART mode (not GPIO mode). Am I wrong about that? I don't have the option to modify the hardware.
I assumed there was some UART interrupt that is not being serviced, but I'm not sure what. I tried installing the unexpected and exception ISRs, but it doesn't look like they were triggered when the lock-up occurred. (Perhaps I did something wrong there though as I haven't used those before.)
Any thoughts on what else I could try or check?