2019-06-12 09:25 AM
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 ?
2019-06-12 10:48 AM
> 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
2019-06-12 12:31 PM
Don't use TC, use TXE
2019-06-12 09:32 PM
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++;
}
}
}