CubeMX HAL_Tick missing
Hi
When I Generate Code i find that HAL_Tick code is not generated and I am required to manually add code to get any MX code to work (given many _Init functions rely on HAL_Tick). I add the code, below, to a USER_CODE area but I don't see why I should have to.
Regards
uint32_t HAL_GetTick (void) {
static uint32_t ticks = 0U;
uint32_t i;
if (osKernelGetState () == osKernelRunning) {
return ((uint32_t)osKernelGetTickCount ());
}
/* If Kernel is not running wait approximately 1 ms then increment and return auxiliary tick counter value */
for (i = (SystemCoreClock >> 14U); i > 0U; i--) { __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); }
return ++ticks;
}
