필터 지우기
필터 지우기

How can i get the system clock of a raspberry pi 4 with Simulink?

조회 수: 8 (최근 30일)
enrico Erbogasto
enrico Erbogasto 2023년 6월 8일
편집: Raghava S N 2023년 6월 19일
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.

답변 (1개)

Raghava S N
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
enrico Erbogasto
enrico Erbogasto 2023년 6월 15일
Thanks for the reply. Excuse my ignorance, but I have another question for you. What do I call this function? With a C function block, right? Thank you very much.
Raghava S N
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 CenterFile Exchange에서 Raspberry Pi Hardware에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by