UART

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,324件の閲覧回数
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,287件の閲覧回数
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,303件の閲覧回数
Elsa_24
Contributor II

.

0 件の賞賛
返信
3,317件の閲覧回数
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,310件の閲覧回数
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,288件の閲覧回数
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,303件の閲覧回数
Elsa_24
Contributor II

.

0 件の賞賛
返信