STM32HAL need HAL_gettick() but CMSIS_OS2 without os_time how do i ... ( ¯¨̯ ¯̥̥ )
Hi Julio,
I guess you are right, the SystemCoreClock should be also divided by 1000, so to not use integer math we should divide it by 1024 (it is close enough for this usage case) which is same as shifting to right for 10 bits, so the "for" loop should be corrected as follows:
for (i = (SystemCoreClock >> 14U); i > 0U; i--) { __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); }
Best regards, Milorad