- Verify the sample time of the blocks in your Simulink model as it can affect the frequency of the output signal.
- Set the solver type to Fixed-step and choose a fixed-step size that matches your desired sample time (e.g., 0.0005 seconds for 2 kHz).
- In the Hardware Implementation pane, ensure that the hardware board is set to Raspberry Pi. Make sure you are deploying the model correctly to the Raspberry Pi.
- Ensure that the GPIO block in your Simulink model is configured correctly. Double-check the pin number and mode.
Simulink Raspberry Code Generation Running Very Slow
8 次查看(过去 30 天)
显示 更早的评论
I am trying to compile a simple gpio trigger signal that I created with Simulink and run it on the raspberry. But unfortunately, when I measure with an oscilloscope from the gpio pin, which should trigger 2khz, I see a 2hz measurement. I would appreciate if you can help with this. It is interesting that even very simple models have such problems. (Matlab2024a)
1 个评论
Amish
2025-3-26
Hi Burak,
A few debugging steps that I could suggest:
I hope these might help you resolve the issue.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!