uart receiving problem?

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

uart receiving problem?

1,314件の閲覧回数
aravindpb5009
Contributor III

hai

      iam using lpc824  we are using two uarts when i try to read my uart1 in receiving end my code  stopped in one area 

i don't know why it was happening let me know the solution in below i attached my code where it was stopped 

please find my attachment 

ラベル(1)
0 件の賞賛
返信
1 返信

1,236件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Aravind,

Regarding your issue that the LPC824 stopped at line:

while (!(base->STAT & USART_STAT_RxRDY_MASK)) {}

The line always waits for the bit setting of USART_STAT_RxRDY_MASK in staus register, when the bit is NOT setting which means that the uart does not receive any data, the lpc824 will stick to the line and wait for bit setting.

so i do not suggest you use the USART_ReadBlocking1() function, which uses polling mode.  I suggest you use interrupt mode.

Hope it can help you

BR

Xiangjun rong