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?
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
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.
Pete