RS232 UART

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

RS232 UART

536 Views
SE500
Contributor I

Hello,

      I currently use the S32K3X4EVB-T17 eval board.

      There's a requirement in my current project. We need high speed of UART.

      From S32K3XXRM.pdf, page 772, it is written LPUART_0 and LPUART_1 is clocked by AIPS_PLAT_CLK, to support up to 12 Mbps while the core is running at 120 MHz, plz can you provide me an example source codes to have a test of high speed UART, if possible at speed of 6 Mbps ? I'd like to know the reg. config to set the baudrate. At my side, I use CH343G a usb dongle that may support up to 6 Mbps.

 

Thank you so much for your support !

 

BR

0 Kudos
Reply
5 Replies

504 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @SE500,

You can modify the LpuartFlexio_Uart_Ip_Example_S32K344 RTD example.

Select LPURT_0 and a custom baudrate in the configuration tool.

You would need to modify also the port, interrupt configuration etc.

But at 120MHz = CORE_CLK = AIPS_PLAT_CLK, this would be the baudrate configuration:

danielmartynek_1-1724228122219.png

danielmartynek_2-1724228188050.png

 

Regards,

Daniel

0 Kudos
Reply

496 Views
SE500
Contributor I

Hi Daniel,

 

   Thank you for your prompt answer. I can't find the example you've mentionned. : LpuartFlexio_Uart_Ip_Example_S32K344 RTD example.

 

When I try to create project from example for my board, I only get that :

 

SE500_0-1724239871328.png

 

Is this normal ? What to install to have your example ?

Sry, I've a beginner in S32k products and S32k design studio.

 

BR

 

0 Kudos
Reply

491 Views
danielmartynek
NXP TechSupport
NXP TechSupport

You don't have the RTD installed in the S32DS 3.5.

Once it is installed, you should see it there.

The RTD is S32K3xx Standard SW.

https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32k-auto-gener...

danielmartynek_0-1724241234546.png

 

You can follow this guide.

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-offline-install-S32K3-RTD-3-0-0-...

 

Regards,

Daniel

 

 

 

0 Kudos
Reply

461 Views
SE500
Contributor I

 

Hi Daniel,

 

    Thank you for your hints. I've installed what you ask me. Now I can create the Lpuart example.


According to the Clk & Lpuart configuration :

AIPS_PLAT_CLK = 48 Mhz

LPUART asynchronous module clk = 7.3 Mhz

to get the baudrate of 115200, we have set

#define LPUART_FEATURE_DEFAULT_OSR (0xFU)
#define LPUART_FEATURE_DEFAULT_SBR (0x4U)

I compiled the source codes and plug the lpuart3 rx/tx wires to my usb uart dongle (CH343G).

I get the WELCOME_MSG_1 "Hello, This message is sent via Uart!" displayed in Putty. Good !

However we didn't get WELCOME_MSG_2 "Have a nice day!", not displayed in Putty ? Bad !

Then, I've changed 

 

Then I changed manually in the file RTD/include/Lpuart_Uart_Ip_HwAccess.h this parameter LPUART_FEATURE_DEFAULT_OSR  to 0, normally, we should be able to run the same demo at speed of 1.8432 Baudrate, but after compilation and reload, nothing happens, nothing displayed in Putty ? Seems the uart clk is not configured ?

 

Plz, tell me what is wrong ?

Also, I'd like to reach the speed of 12 Mbps with the dongle FT232H which can run at this speed, how can I achieve this with S32K344 ?

 

Thank you

0 Kudos
Reply

348 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SE500,

It is important to set the system clock correctly.

Use Option A (core_clk 160MHz), and set all the clocks precisely.

RM, Section 24.7.2 System clocking configurations.

 

The RTD generated code should not be modified manually.

Check the LPUART registers after the initialization of the LPUART driver.

 

Keep in mind that not all the pins support such a baudrate.

DS, Table 25. GPIO DC electrical specifications, 5.0V (4.5V - 5.5V)

danielmartynek_0-1724655589295.png

 

Regards,

Daniel

 

0 Kudos
Reply