How can i get the system clock of a raspberry pi 4 with Simulink?
4 次查看(过去 30 天)
显示 更早的评论
I have to debug a signal from a GPS readed by a raspberry pi 4. From the gps i obtain the time in hh:mm:ss:ms and i save it on a file. I want also to save the system clock of the raspberry (NOT the simulations time), to compare the delay. Currently i am deploing a simulink script with the raspberry toolbox. How is it possible? Thanks to all.
0 个评论
回答(1 个)
Raghava S N
2023-6-13
编辑:Raghava S N
2023-6-14
You need to include profile_timer.h from MATLAB\R2023a\toolbox\target\shared\armcortexabase\include\profile_timer.c. This has a function called profileReadTimer() which is defined in MATLAB\R2023a\toolbox\target\shared\armcortexabase\src\profile_timer.c. This function can be called to access the local time of the Pi.
2 个评论
Raghava S N
2023-6-19
编辑:Raghava S N
2023-6-19
Yes, presumably, although that depends on your use-case. You can also manually insert the function call after C/C++ code generation of your Simulink block.
另请参阅
类别
在 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!