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.

UART write and read problem



Hi,

I want to use the serial port to exchange data between DSP and Matlab, the data to be exchanged is float array. So on the DSP side, I need to write float array to the serial port and read float array privided by Matlab from the serial port. I am considering to use the platform_uart_write and platform_uart_read functions defined in platform.c. However, these two functions operate on char parameter, not float. So how should I modify these functions in order to operate float data?

Regards,

Yang

  • Uart would operate inherently on byte (characters) stream. I would suggest not to modify the functions but store the data in a pre-defined memory location and read it back in the format you want. Basically, I am suggesting is you write a routine that does data manupalation.