UART- S32K144 EVB

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

UART- S32K144 EVB

Jump to solution
2,441 Views
DIVYAJ1
Contributor I

 

I am currently working with the S32K144-EVB and attempting to perform data transmission and reception using UART. However, I am encountering difficulties with the UART configuration, especially since I am new to S32Design Studio.

Initially, I tried the example UART project and successfully received the transmitted value. However, when I created a new project and configured the UART, I did not receive any data.

Could you please provide guidance on how to properly configure UART in a new project.

0 Kudos
Reply
1 Solution
2,407 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DIVYAJ1,

In order to use UART, you can simply add the UART component and configure the pins through Config Tools:

Julin_AragnM_0-1731017569607.png

uartconfig.png

 
 

Julin_AragnM_3-1731017652665.png

 
 

uartconfig1.png

If you want to use interrupts or a callback for your reception and transmission, then the IntCtrl driver must also be added, but for a simple uart configuration that should be enough.

I've attached a simple example which echoes the inputs through a serial terminal through UART1 (connected to the EVB's USB):

Julin_AragnM_7-1731017823878.png

Best regards,
Julián

View solution in original post

0 Kudos
Reply
5 Replies
2,408 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DIVYAJ1,

In order to use UART, you can simply add the UART component and configure the pins through Config Tools:

Julin_AragnM_0-1731017569607.png

uartconfig.png

 
 

Julin_AragnM_3-1731017652665.png

 
 

uartconfig1.png

If you want to use interrupts or a callback for your reception and transmission, then the IntCtrl driver must also be added, but for a simple uart configuration that should be enough.

I've attached a simple example which echoes the inputs through a serial terminal through UART1 (connected to the EVB's USB):

Julin_AragnM_7-1731017823878.png

Best regards,
Julián

0 Kudos
Reply
2,387 Views
DIVYAJ1
Contributor I

Hi,

Thankyou for replying.

I imported the file you provided and successfully received transmitted data in the debug terminal.

However, after following the UART configuration steps to create a new project, I am only seeing ‘NULL’ in the debug terminal instead of the expected transmitted data.

 

Screenshot 2024-11-08 111212.png

 

 

 

 

 

Screenshot 2024-11-08 111424.png

 

 

 

0 Kudos
Reply
2,371 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DIVYAJ1,

Could you share your code (main.c)? Maybe you are missing some steps initializing or using the functions.

The basic uart project should look something like this:

int main(void)
{
	/* Initialize and configure clocks
	*    -   see clock manager component for details
	*/
	CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
						g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
	CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);

	/* Initialize pins
	*    -   See PinSettings component for more info
	*/
	PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);

	/* Initialize for UART_PAL */
	UART_Init(&uart_instance, UART_PAL_CONFIG);

	/* Send a welcome message */
	UART_SendDataBlocking(&uart_instance, (uint8_t *)welcomeMsg, strlen(welcomeMsg), TIMEOUT);
}

Best regards,
Julián

0 Kudos
Reply
2,327 Views
DIVYAJ1
Contributor I

Here is the project file;

0 Kudos
Reply
2,307 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DIVYAJ1,

Sorry for the misunderstanding, but are you using config tools or are you configuring the drivers yourself with registers? Following the thread, I was giving recommendations on how to configure the UART by using the GUI for the drivers, but the project you shared does not use these generated configurations.

If you need to configure the example in bare metal, please follow AN5413: S32K1xx Series Cookbook, which includes an example for a simple UART 9600 baud transfer to a COM port on a PC in chapter 2.7.

Best regards,
Julián

0 Kudos
Reply