나는 RTOS를 실행하는 PIC32MX460F512L을 가지고 있으며 코드에서 두 점 사이의 차이를 얻는 방법을 찾고있다.PIC32, 무료 RTOS 시계 (ms)
아래의 코드는 틱 시간을 가져 오지만 시간은 ms로 표시하지 않습니다.
static unsigned long gMSTP_timer_tick = 0 ;
void MSTP_timer_reset() {
gMSTP_timer_tick = xTaskGetTickCount() ;
}
FLOAT32 MSTP_timer_differences() {
unsigned long differences = xTaskGetTickCount() - gMSTP_timer_tick ;
gMSTP_timer_tick += differences ;
return (FLOAT32) differences ;
}
내 질문이free RTOS에서
MS의 현재 상대 시간을 얻을 수있는 방법이 무엇입니까?
주어진 시간에 타이머가 5-8ms만큼 꺼져있는 것처럼 보입니다. 좀 더 자세하게 살펴본 결과, 다른 인터럽트 때문이라는 것을 알았습니다. –