Define the Sample Time in blocks to be built in ESP32

3 次查看(过去 30 天)
I have a problem when defining the Block Parameter Sample time in Simulink Model. For example, in the Uniform Random Number block for a model intended for the ESP32 board, I need to define a maximum Sample Time 1.0e-04. With a Sample time equal to 1.0e-03 the model is deployed to the board and works, but when Sample Times < 1.0e-03 is set the model is compiled and loaded correctly to the board but it does not respond. I am using an ESP32-WROOM 30 pins. I have used the same model previously with an Arduino Due board, which does accept Sample Time< 1.0e-04. Is there a solution?

回答(1 个)

Abhinav Aravindan
Abhinav Aravindan 2024-9-19
I understand you are facing challenges with setting the Sample Time for the ESP32 board. I believe that the ESP32 board has a sample time limitation of 0.001s. This is because the ESP32 board runs on FreeRTOS. For FreeRTOS, the maximum supported CPU Tick Rate is 1KHz, hence limiting the sample time to 0.001s.
Please find below the relevant documentation for your reference.
I hope this answers your question!

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by