AnsweredAssumed Answered

DSC MC56F82748 of UART(PE of Serial_LDD) issue

Question asked by kris ke on May 10, 2019
Latest reply on May 14, 2019 by xiangjun.rong

Hi 

 

Below is my processor expert of Serial LDD setting.

 

 

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.

 

 

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

 

 

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?

Attachments

Outcomes