Loading...
 
Skip to main content

System Workbench for STM32


Generate Software Interrupt (SI) with STM32F· Discovery board with HAL drivers

Thanks for your answer. I checked the timer configuration and it seems to works fine, the interruption of the timer goes every 1 ms as I want, the problem I have is with the delay of the software interrupt. I've replaces osDelay() with HAL_Delay(), which use the ticks of the clock of the system to calculate the delay:
weak void HAL_Delay(IO uint32_t Delay)
{
uint32_t tickstart = HAL_GetTick();
while((HAL_GetTick() - tickstart) < Delay)
{
}
}

But when I do these, the software interrupt never goes out the HAL_Delay(), because the system stop increasing the ticks. I don't understand why because the system interruption have hight priority than the software interrupt ( I've set the first to priority 0 and the other to priority 5). So I don't know how to make a delay in this interruption whitout interrupting any other process of the system with highest priority. That's the problem, but thanks for your time.

Andreas

 
Collapse/expand modules below