USB SDK files explanation

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

USB SDK files explanation

Jump to solution
1,832 Views
patriciocohen
Contributor IV

Hi guys,

I will appreciate if someone can explain me the purpose of the following files:

1) serial_port_uart.c

2) serial_manager.c

3) lpuart_adapter.c

I would like to know how they work, but code comments are almost non existent.

Where do I define that the UART has to be connected to the USB PHY, to create an USB COM port?

Thank you,

Patricio

Labels (1)
1 Solution
1,616 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi   Patricio

serial_port_uart.c defined LPUART APIs with user-defined settings, such as baudrate, parity mode....  please see functions Serial_UartInit/Read/write/...

These Serial_Uartxxx functions will call HAL_Uartxxxx, they are defined in LPUART_adapter.c

I would suggest refer to the uart demo for how to use lpuart driver .

SDK_2.6.0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\lpuart

Please also read SDK API reference Manual: chapter 24 LPUART.

Regards

Daniel

View solution in original post

4 Replies
1,616 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

The purpose of the serial manger is to mask the differences in multiple hardware modules.

The architecture of the serial manger is shown below:

pastedImage_1.png

For your case, serial_manage.c is in a high level.

Regards

Daniel

1,616 Views
patriciocohen
Contributor IV

Hi Daniel,

Thanks for your reply.

And what about the other 2 files ( serial_port_uart.c and lpuart_adapter.c) ?

Thank you!

0 Kudos
Reply
1,617 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi   Patricio

serial_port_uart.c defined LPUART APIs with user-defined settings, such as baudrate, parity mode....  please see functions Serial_UartInit/Read/write/...

These Serial_Uartxxx functions will call HAL_Uartxxxx, they are defined in LPUART_adapter.c

I would suggest refer to the uart demo for how to use lpuart driver .

SDK_2.6.0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\lpuart

Please also read SDK API reference Manual: chapter 24 LPUART.

Regards

Daniel

1,616 Views
patriciocohen
Contributor IV

Thank you Daniel

0 Kudos
Reply