I am trying to exchange data (str data) between two STM32 throughout Lora connectivity. Both STM32 has a lora module and the connection between them is working fine. Based on two functions:

T_eError_eErrorType eDataPlane_eReceiveData_Cmd (uint32_t in_uiTimeout, uint8_t* out_pucData, uint8_t inout_pucLength, T_stSx1276_eRxPacketStatus out_pstRxPacketStatus)

T_eError_eErrorType eDataPlane_eSendData_Cmd (uint8_t* in_pucData, uint8_t in_ucLength)

I am trying to send and receive messages instantly. I discovered a huge problem: for example I am trying to send a data which has a duration equal to 300ms while the timeout of receiving the data is fixed to 3000 ms. It may, in one rare case, be a loss of such a data, when the data arrives at the time of 2800 ms of the timeout of the receiver. Such a problem is similar to the exchange of data in the UART interface when using the blocking mode (HAL_UART_Receive (&huart1, UART1_rxBuffer, 12, 5000);). My question is how to garantee receiving the data without losing any byte and by using a receiving with timeout function. Thanks in advance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.