DSC MC56F82748 of UART(PE of Serial_LDD) issue

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

DSC MC56F82748 of UART(PE of Serial_LDD) issue

673 Views
Kris_Ke
Contributor III

Hi 

Below is my processor expert of Serial LDD setting.

01.PNG

And I follow the "Help Component" to porting my code as below

Content of Main.c

---------------------------------------------------------------------------------------------------------

volatile bool DataReceivedFlg = FALSE;
char OutData[] = "Hello world";
char InpData[10];
LDD_TError Error;
LDD_TDeviceData *MySerialPtr;

void main(void)
{
. . .
MySerialPtr = AS1_Init(NULL); /* Initialization of AS1 component */
for(;;) {
Error = AS1_ReceiveBlock(MySerialPtr, InpData, 1U); /* Start reception of one character */
while (!DataReceivedFlg) { /* Wait until 'e' character is received */
}
if (InpData[0] == 'e') {
Error = AS1_SendBlock(MySerialPtr, OutData, sizeof(OutData)); /* Send block of characters */
}
DataReceivedFlg = FALSE;
}
}

---------------------------------------------------------------------------------------------------------

Content of Even.c

---------------------------------------------------------------------------------------------------------

extern volatile bool DataReceivedFlg;

void AS1_OnBlockReceived(LDD_TUserData *UserDataPtr)
{
DataReceivedFlg = TRUE; /* Set DataReceivedFlg flag */
}

---------------------------------------------------------------------------------------------------------

Issue Result:

I can't receive any message from the terminal. When I check the waveform. It seem some problem in the last stop bit.

It extends the stop bit.

tek00001.png

I user other kinetis MCU to sent same word. It looks whole different in the last stop bit.

tek00000.png

BTW, I use Kinetis MCU to sent data to MC56F82748 of UART Rx, It's never enter Rx interrupt.

Did i make any mistake in the serial setting?

Labels (1)
0 Kudos
2 Replies

559 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Kris,

Can you tell me the hardware connection? do you use TWR-8200 board or your PCB designed by yourself. If you use your own board, which pin is RxD, which pin is TxD?

BR

Xiangjun Rong

0 Kudos

559 Views
dynapb
Contributor IV

Hi Kris

It looks like the data is the same except for a small difference in timing and the long low time at the end.

In the image below you do get the Stop bit (high) but the long low time looks like a Brake.

Maybe try setting the "Break generation length" to some other value, 0?

Also check to see if the pin is set as Peripheral in the GPIO.

UART_Data.png

Pete

0 Kudos