Hi,
I’m working with the RT1052/RT1064 and MCUXpresso v11.5. My goal is to create a USB (device side) to UART bridge. I could not find any close examples to this beyond the Host CDC. So I started to create this from scratch.
I need to use UART byte by byte receiving because of dynamic incoming message sizes. Can you confirm it is not possible to use the RX interrupt (and ReceiveByte) and the TransferSendNonBlocking together? Each mechanism works separately for me but not together. Looking inside the code it seems as through the LPUART_TransferCreateHandle function deals with the RX interrupt which probably prevents my custom RX IRQ handler with LPUART_ReadByte from working. If that is the case, is it better to implement both send and receive via interrupt handling or is there another suggestion? Thanks.
Mark
For TX:
LPUART_Init
LPUART_CreateHandle
LPUART_TransferSendNonBlocking
For RX:
LPUART_EnableInterrupts
EnableIRQ
In ISR - LPUART_ReadByte
I ended up using LPUART_ReadByte / LPUART_WriteByte and a separate ring buffer for each direction. This works.
Next is to added USB connection. Thanks.