This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: UART skipping characters

Part Number: MSP432E401Y

Hi,

My UART seems to go into an exit loop whenever I dont add the delay cycles. When I do add the delay it skips characters. Is there anything wrong with the routine, what can I do to fix it

extern "C" void UART7_IRQHandler(void)
{
uint32_t ui32Status7;
ui32Status7 = UARTIntStatus(UART7_BASE, true);
// GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, GPIO_PIN_1);
Coordinator::ManagerMap::iterator it = coordinator.managers.find(TransitPacket::Device::Receiver2);
ReceiverManager *manager = static_cast<ReceiverManager*>(it->second);
if(it->first == TransitPacket::Device::Receiver2){
if((ui32Status7 & UART_INT_RX) == UART_INT_RX){
while(UARTCharsAvail(UART7_BASE)){
uchar byte = UARTCharGetNonBlocking(UART7_BASE);
manager->pushByte(byte);
manager->setLastByteSeconds(manager->getRtcSeconds());
UARTIntClear(UART7_BASE, UART_INT_RX);
//__delay_cycles(20000);
}

}
else if((ui32Status7 & UART_INT_TX) == UART_INT_TX){
manager->sendNextByte(UART7_BASE);
UARTIntClear(UART7_BASE, UART_INT_TX);
test++;
// GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0);
}
}
}

**Attention** This is a public forum