UART

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
3,321 次查看
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 项奖励
回复
1 解答
3,284 次查看
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

在原帖中查看解决方案

5 回复数
3,300 次查看
Elsa_24
Contributor II

.

0 项奖励
回复
3,314 次查看
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 项奖励
回复
3,307 次查看
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 项奖励
回复
3,285 次查看
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

3,300 次查看
Elsa_24
Contributor II

.

0 项奖励
回复