Skip to main content
ÇSütu.1
Associate II
November 19, 2020
Question

STM32F4 USART_Receive block usage problem in Simulink

  • November 19, 2020
  • 1 reply
  • 1093 views

Hi everyone,

I am trying to read a laser sensor through UART of STM32F4 inside Simulink. The laser sensor's refresh rate is 10 Hz approximately but it does not give the data periodically. I am using UART Interrupt for reading action. There are two cases:

->If I read it byte per byte, then I can not receive the laser data in necessary order. It is received randomly.

->If I read it by defining a buffer inside UART, depending on the size of the buffer, it is filled correctly but this time because of randomness in byte per byte case, the refresh of the data is not at the desired level.

Probably either because of Simulink's built in code for UART or because of something that I don't understand, the reception is not at the desired level. I am open to any suggestions and help.

This topic has been closed for replies.

1 reply

NOsdi.1
Visitor II
August 13, 2022

Hi CSutu,

I am new also trying to read data with Simulink - Did you figured out the solution ? if yes could please share how to do it ?

many thanks,