lpuart issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpuart issue

Jump to solution
813 Views
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

Labels (1)
0 Kudos
1 Solution
473 Views
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!

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

View solution in original post

0 Kudos
3 Replies
473 Views
gnichimohamed
Contributor III

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

0 Kudos
474 Views
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 Kudos
473 Views
jacobjennings
Contributor III

The receiving case of this example is blocking.

0 Kudos