UART

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1,588 Views
Krishnaja
Contributor II

Hi,

I tried "LINFlexD_UART MPC5748G " example, when I run this I got "Hello World!" on hyper terminal. 

But according to documentation "S32SDK_MPC5748G_UserManual"

Application description
The purpose of this example is to highlight the usage of UART driver implemented over LINFLEXD module on
MPC5748G CPU using the S32 SDK API. The application will echo 'Hello World!' to the console; if 'Hello' string is
received from the console, the board will answer with 'Hello World!' again.

Note
The application only takes into account the first 5 characters sent from the console at a time; anything after
that will be discarded.

Just "LINFLEXED_UART_DRV_SendData(INST_LINFLEXED_UART1,(uint8_t*)msg,strlen(msg));" is sufficient to print message on console(hyper terminal).

My, question is where should I type "Hello" to get "Hello World!"? 

 

Krishnaja.

0 Kudos
1 Solution
1,551 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this example is written in the way it waits for message received from console. If the message contains "Hello" in first 5 characters and it is received within 300ms , the "Hello World!" is send back. The application does not echo if received bytes are different.
So ideally use some terminal that can send whole message after you trigger it, for example mentioned Termite

PetrS_0-1615496434016.pngPetrS_1-1615496500957.png

 

BR, Petr

View solution in original post

5 Replies
1,567 Views
Elsa_24
Contributor II

.

0 Kudos
1,581 Views
Elsa_24
Contributor II

You must first install a terminal, for example "Termite", and configure it according to the UART configuration of the program. (In principle the basic configuration of the Ternimal is that of the program).

debug the program by leaving the Terminal window open.

The "Hello!" is indeed written on the Termite Terminal console.

0 Kudos
1,574 Views
Krishnaja
Contributor II

Hi Elsa,

I want to type another word say "Hello" again on hyper terminal, and program in not going inside IF loop.

Please suggest me how to do it.

 

Krishnaja.

0 Kudos
1,552 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this example is written in the way it waits for message received from console. If the message contains "Hello" in first 5 characters and it is received within 300ms , the "Hello World!" is send back. The application does not echo if received bytes are different.
So ideally use some terminal that can send whole message after you trigger it, for example mentioned Termite

PetrS_0-1615496434016.pngPetrS_1-1615496500957.png

 

BR, Petr

1,567 Views
Elsa_24
Contributor II

.

0 Kudos