HAL_GetTick() freezes and stops to update
During the debugging, I noticed HAL_GetTick() freezes, I mean uwTick does not update anymore and holds the same value.
This issue is happening while the TIM15_IRQHandler is called and executes a function responsible for reading from an SPI communication, it is shown below:
uint8_t canSpi_readAdresss(spi_SlaveInterface* spi, uint8_t adress, uint8_t* rxData, uint8_t rxBytes)
{
uint8_t rxArray[2 + rxBytes];
uint64_t timeout = HAL_GetTick() + 5;
while (timeout > HAL_GetTick())
{
if (spi->master->activSlave == NULL)
{
uint8_t msgData[2];
msgData[0] = 0b00000011; // read
msgData[1] = adress;
if (spi_TransmitReceive_(spi, msgData, 2, rxArray, rxBytes) == 0)
{
for (uint8_t i = 0; i < rxBytes; ++i)
{
rxData[i] = rxArray[2 + i];
}
return 0;
}
else
{
//rxData = 0;
}
}
}
return 0xff;
}
The HAL_GetTick() holds the same value, therefore the execution gets stuck in the while-loop. It can happen just after the debugging starts or any time later.
The Tick priority uwTickPrio is 0 "zero", always.
Below is an image from the code execution shown in Parallel Stacks:
As it is the first time I am facing this kind of issue, I am a bit confused about what might be causing it.
Any help would be highly appreciated.
The settings are:
MCU: STM32F303VE
Microsoft Visual Studio Professional 2019 - Version 16.11.30
VisualGDB Version 5.6R9
