Part Number: MSP432P401R
I am trying to send some chars over the UART. When I run my program without debugger only last character of message is arrived on PC but if I do that step by step all chars are on target. My code is very simple:
void WiFiPrint(char *msg)
{
uint32_t i;
status = 0;
memset(niz,0,sizeof(uint8_t)*15);
for(i=0; i < strlen(msg); i++)
{
niz[i] = msg[i];
while((UCA2IFG & EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG));
MAP_UART_transmitData(EUSCI_A2_BASE, msg[i]);
}
}
void EUSCIA2_IRQHandler (void)
{
uint32_t status = MAP_UART_getEnabledInterruptStatus(EUSCI_A2_BASE);
MAP_UART_clearInterruptFlag(EUSCI_A2_BASE, status);
if (!status)
return;
if (status & EUSCI_A_UART_TRANSMIT_INTERRUPT)
{
__no_operation();
}
}
After loop execution in both way array niz iz filled with all chars from message so loop was executed.
Where did I go wrong?
Best regards,
Djordje Radovanovic