Define the Sample Time in blocks to be built in ESP32
3 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Abhinav Aravindan
on 19 Sep 2024
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!
0 Comments
See Also
Categories
Find more on Event Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!