Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 1 month ago.
HRM1017 Serial port delay and loss
Hello,
Loss of rare data in serial communication (Rx) and the delay (Tx) may occur.
ch1 Rx,ch2 Tx
baudrate:19200
TxData:14byte
received use https://developer.mbed.org/users/KentaShimizu/code/BufferSerial/
Transmission use https://developer.mbed.org/handbook/Serial
code
--------------------
Serial StdUart(P0_9,P0_11);
void UartTxData(unsigned char *InData)
{
char TxData[BLE_DATA_LEN + 2 + 1] = {0};
TxData[0] = UART_PREFIX_1ST_BYTE;
TxData[1] = UART_PREFIX_2ND_BYTE;
memcpy(&TxData[2],InData, BLE_DATA_LEN);
StdUart.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c",TxData[0] ,TxData[1],TxData[2],TxData[3],TxData[4],TxData[5],TxData[6],TxData[7],TxData[8],TxData[9],TxData[10],TxData[11],TxData[12],TxData[13]);
}
--------------------
I want to avoid the loss and delay of data, Is there a way?
Is there a problem with the transmission method?
Or it is transmitted and received at the same time there is no problem?
Regards,