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:
I just want to avoid delays in my code design. I do not want to UART transmission block other process in my code. What is the difference between Byte vs Interrupt mode.
Byte Mode : (LPUART_WriteByte and LPUART_ReadByte)
Interrupt Mode : (LPUART_TransferSendNonBlocking and LPUART_TransferReceiveNonBlocking)
Thanks and Regards.
Solved! Go to Solution.
Hi,
Thanks for your reply.
1) Will it block other operations when I use Byte Mode?
-- No, it's not sure, as the MCU executing either LPUART_WriteByte or LPUART_ReadByte function, it may interrupt other functions or APIs.
However, it won't interrupt other peripherals' operations if they use either interrupt mode or DMA mode.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your statement, I think the Interrupt and DMA modes are a better choice for your design, and if transmit a fixed and large amount of bytes per time, you'd better prefer the DMA mode, otherwise, the interrupt mode is a good one.
To learn the differences among the above APIs, I'd highly recommend reviewing the code.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
Hi Dear @jeremyzhou,
I was wonder about, will it block other operations when I use Byte Mode?
Thanks and Regards.
Hi,
Thanks for your reply.
1) Will it block other operations when I use Byte Mode?
-- No, it's not sure, as the MCU executing either LPUART_WriteByte or LPUART_ReadByte function, it may interrupt other functions or APIs.
However, it won't interrupt other peripherals' operations if they use either interrupt mode or DMA mode.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------