IMXRT1024 UART Data Transmission Types

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

IMXRT1024 UART Data Transmission Types

Jump to solution
573 Views
Lukas_Frank
Senior Contributor I

Hi all,

 

My question about data transmission process of UART. There are a few couple of methods to send/receive data in codes as uart architecture with NXP like belows:

  • LPUART_WriteByte
  • LPUART_ReceiveByte
  • LPUART_WriteBlocking
  • LPUART_ReceiveBlocking
  • LPUART_SendEDMA
  • LPUART_ReceiveEDMA
  • LPUART_TransferSendNonBlocking
  • LPUART_TransferReceiveNonBlocking

All declerations belong these methods are given in comments. But I am confused little about the differences and use cases in real life. Which one should I use to best performence?

 

Is there any document that explain the performence differences better? If it is not exist, what means blocking?

For example; I am using five of my UARTs (UART1, UART2, UART3, UART4, UART5). What happens when I use LPUART_WriteBlocking? Are not able to process my UART transmission same time? So, I am sending/receiving with UART1 by WriteBlocking, Does it mean that UART2,3,4,5 must wait until UART1 operations finish? Is LPUART_WriteByte approach better than LPUART_WriteBlocking_

 

What are the advantages/disadvantages of these approaches given in above?

 

Thanks and Regards.

Labels (1)
0 Kudos
1 Solution
569 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Lukas_Frank ,

   The RT UART is no special, to UART, normally contains these method to do the transmit, polling, interrupt, DMA.

    So, your mentioned :

  • LPUART_WriteByte : Write data to the register buffer
  • LPUART_ReceiveByte: read data from the register buffer
  • LPUART_WriteBlocking: polling mode
  • LPUART_ReceiveBlocking: polling mode
  • LPUART_SendEDMA: DMA mode
  • LPUART_ReceiveEDMA: DMA mode
  • LPUART_TransferSendNonBlocking:interrupt mode
  • LPUART_TransferReceiveNonBlocking:interrupt mode

In fact, you also can check the details API, you will know more details.

Code is the best document, you can associated with the RM to read the code.

The API can be used for all the UART interface, you just need to change the interface is OK.

 

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

View solution in original post

1 Reply
570 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Lukas_Frank ,

   The RT UART is no special, to UART, normally contains these method to do the transmit, polling, interrupt, DMA.

    So, your mentioned :

  • LPUART_WriteByte : Write data to the register buffer
  • LPUART_ReceiveByte: read data from the register buffer
  • LPUART_WriteBlocking: polling mode
  • LPUART_ReceiveBlocking: polling mode
  • LPUART_SendEDMA: DMA mode
  • LPUART_ReceiveEDMA: DMA mode
  • LPUART_TransferSendNonBlocking:interrupt mode
  • LPUART_TransferReceiveNonBlocking:interrupt mode

In fact, you also can check the details API, you will know more details.

Code is the best document, you can associated with the RM to read the code.

The API can be used for all the UART interface, you just need to change the interface is OK.

 

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry