AnsweredAssumed Answered

Constant UART ISRs

Question asked by RANDY LEE on Nov 15, 2018
Latest reply on Nov 19, 2018 by RANDY LEE

I'm attempting to being up a UART in MCUexpresso SDK 2.4 on an MK22FN part in interrupt mode (upper layers to deal with unexpected reception of packets from a peripheral).


This device (UART 0) is getting initialized as part of the regular BOARD_InitPeripherals() but I've turned off turning on the interrupts as I've got a bunch of setup to do prior to getting any ISRs. TX watermark is set to 0; RX watermark is set to 1 so as to get ISR for each char in and out.


As soon as I turn interrupts on (NVIC_SetPriority() followed by EnableIRQ()) for the UART I get a RX_TX (not error) ISR and it is constant.  Lines in and out look normal and idle.


Inside the ISR I grab the status with UART_GetStatusFlags() and it returns 0xC00000C00 which is pretty much what I'd expect given that there is nothing in the UART at that point far as I know (in or out).


The problem is that I return out of the ISR and get another one just as soon as I get out.  I can't figure out how to get the UART to stop giving me ISRs here.


I don't have problems on this part using KDS and PEX versions of this.  I've looked through that code and don't see anything I'm missing here far as I can figure. Adding the demo code from ...\driver_examples\uart\interruptuart_interrupt.c to this project, it acts the same way.


Any ideas?  I'm out of them myself...