This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial Communication between DSP 28379d and MATLAB/Simulink C Mex Function

When using serial communication between DSP F28379d and MATLAB / Simulink using C Mex functions, certain moments present errors in the received control variables.

For reading and writing on the serial port I use the commands "serialSendBuff((unsigned char *)&Id_bits,2)" and "serialReceiveBuff((unsigned char *)&Vd_bits,2)".

In this situation, what is the best strategy to identify the error and correct it?

I see two alternatives. First alternative, use the values from the previous step of the variables with error. Second alternative, ask the DSP to resend these variables?

Is there another possibility? What is the most common to be done?