Skip to content

Commit 6c5af87

Browse files
committed
Enable access to kernel tick information in ISR
The osKernelGetTickCount() is the only function to get kernel tick information, however it's not allowed to access in ISR. It's already enabled in API v2.1.1.
1 parent de6d291 commit 6c5af87

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rtos/TARGET_CORTEX/rtx5/rtx_kernel.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,7 @@ void osKernelResume (uint32_t sleep_ticks) {
607607
/// Get the RTOS kernel tick count.
608608
uint64_t osKernelGetTickCount (void) {
609609
if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
610-
EvrRtxKernelGetTickCount(0U);
611-
return 0U;
610+
return svcRtxKernelGetTickCount();
612611
} else {
613612
return __svcKernelGetTickCount();
614613
}
@@ -617,8 +616,7 @@ uint64_t osKernelGetTickCount (void) {
617616
/// Get the RTOS kernel tick frequency.
618617
uint32_t osKernelGetTickFreq (void) {
619618
if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
620-
EvrRtxKernelGetTickFreq(0U);
621-
return 0U;
619+
return svcRtxKernelGetTickFreq();
622620
} else {
623621
return __svcKernelGetTickFreq();
624622
}

0 commit comments

Comments
 (0)