lpuart issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

lpuart issue

跳至解决方案
1,599 次查看
gnichimohamed
Contributor III

Hello

I am starting to use lpuart on freedom KL03Z board. I started with lpuart_non_blocking_example which works fine. However as soon as i start a new project with processor expert the lpuart doesn't work. I am suspecting that the issue lies within the initialisation code of PeX. I attached the project here.

Second question, I want to read incoming chars, one by one so i want to make something like this

While(rxbuffer is not empty)         LPUART_DRV_ReceiveData(BOARD_DEBUG_UART_INSTANCE, &rxChar, 1);

 

I can't find a way to test if the rxbuffer is empty or it has something in it. I have to test that because in my application i don't know how much bytes am going to receive either 2 or 3. I am looking for a similar function like the arduino Serial.available().

 

Thank you for helping

Original Attachment has been moved to: uart.rar

标签 (1)
0 项奖励
回复
1 解答
1,259 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Gnichi,

I had some problems opening your project, bu please find attached a non blocking lpuart example using Processor Expert for the KL03Z.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,259 次查看
gnichimohamed
Contributor III

Is there at least a processor expert example using lpuart like the non blocking example?

0 项奖励
回复
1,260 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Gnichi,

I had some problems opening your project, bu please find attached a non blocking lpuart example using Processor Expert for the KL03Z.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,259 次查看
jacobjennings
Contributor III

The receiving case of this example is blocking.

0 项奖励
回复