Hi,
I want to use STM32427 instead of STM32407, but uVision V4 doesn't supports that chip. So I upgrade uVision from V4 to V5, and plan to use CMSIS-RTOS RTX instead of RTX.
But now I have some questions after read the paper named "Migrate RTX to CMSIS-RTOS":
1.How can I delay a thread or pend a semphone less then 1ms? (I have a thread need to do periodic things and pend some thread messages, so the timeout should less then 1ms)
2.If CMSIS-RTOS RTX doesn't support, can I still use RTX on STM32M427 by uVision V5, is there any problem?
Thanks! Best regards
Thanks for your reply! Yes, it work when I used the old RTX. I set OS_TICK value to 10[us] and used rt_dly_wait function to delay faster than 1000[us]:
void rt_dly_wait(U16 delay_time)
But now if I use the new API in CMSIS-RTOS:
osStatus osDelay(uint32_t millisec)
it can't delay faster then 1000[us].
Because in rt_CMSIS.c, it defined the generic wait function:
SVC_1_1(svcDelay, osStatus, unit32_t, RET_osStatus)
the svcDelayy called rt_dly_wait(rt_ms2tick(millisec)) to implemented the time delay. The rt_ms2tick function convent timeout in millisec to system ticks:
static uint32_t rt_ms2tick(uint32_t millisec){ uint32_t tick; ...//some if conditions tick = ((1000*millisec) + os_clockrate -1) / os_clockrate; ...// return tick; }
I dont't think use this osDelay function can delay faster then 1000[us].
So if I want to dealy faster then 1000[us], do I have to use old RTX API and include RTL.H instead of cmsis_os.h ?
You may use osKernelSysTickMicroSec() to create your custom microseconds delay loop.