LPUART Transfer empty flag 0 as soon as I try to send something

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPUART Transfer empty flag 0 as soon as I try to send something

ソリューションへジャンプ
937件の閲覧回数
ping1
Contributor V

Dear support

I try to use LPUART_WriteBlocking() function to send some data out, but it hand in the status register check - the transfer empty flag in status register TDRE is 0, means full. I have checked the register before calling this function, and it is 1, not as soon as I call it, it hangs there forever, before this it is able to receive something, and it is the first time I call the function, could you help please?

Regards!

Ping

0 件の賞賛
返信
1 解決策
910件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @ping1 ,

When the transmit FIFO is enabled, TDRE is set when the number of datawords in the transmit FIFO is
equal to or less than the number indicated by WATER[TXWATER]. It is controlled by hardware of course.  If it is always 0, that means the data in FIFO isn't sent. Can you see something on TX line?

Regards,

Jing

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
923件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @ping1 ,

Please refer to the lpuart_interrupt demo in SDK. It use LPUART_WriteBlocking()  too.

 

Regards,

Jing

0 件の賞賛
返信
921件の閲覧回数
ping1
Contributor V

Thanks for reply, Jing

Just wonder why it is blocked by the status flag - is it caused by hardware?

Ping

0 件の賞賛
返信
911件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @ping1 ,

When the transmit FIFO is enabled, TDRE is set when the number of datawords in the transmit FIFO is
equal to or less than the number indicated by WATER[TXWATER]. It is controlled by hardware of course.  If it is always 0, that means the data in FIFO isn't sent. Can you see something on TX line?

Regards,

Jing

0 件の賞賛
返信