cancel
Showing results for 
Search instead for 
Did you mean: 

Uart timeout?

vitthal muddapur
Associate II

Hi,

I am using LPUART for sending data to the GSM. I wrote own uart transmit driver without timeout, like

void LPUART1_Send_Data(uint8_t *string)

{

while(*string)

{

if((LPUART1->ISR & USART_ISR_TC)==USART_ISR_TC)

{

LPUART1->TDR=*string;

string++;

}

}

}

any possibility to getting issue without timeout ?

3 REPLIES 3

> Any possibility to getting issue without timeout ?

Transmit only?

No, unless you decide to shoot yourself into your foot (by doing something completely nonsensical, e.g. switching off the LPUART's clock in an interrupt).

JW

Don't use TC, use TXE

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you

This Function handler Okay ?

any possibility to hanging here ?

void LPUART1_Send_Data(uint8_t *string)

{

while(*string!='\0')

{

if((LPUART1->ISR & USART_ISR_TXE)==USART_ISR_TXE)

{

LPUART1->TDR=*string;

string++;

}

}

}