cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_Delay configuration with STM32CubeIDE

matth_he
Associate

Hello All,
I'm starting a project based on a STM32WL.
After downloading the "SubGHz_Phy_Per" project I try to duplicate the project for my custom board based on the STM32WLE5CBUX.

The "SubGHz_Phy_Per" project provide the HAL_Delay(Delay) via a call to the TIMER_IF_DelayMs(Delay) defined in the timer_if.c . And it works. The code is clear.

void TIMER_IF_DelayMs(uint32_t delay) { /* USER CODE BEGIN TIMER_IF_DelayMs */ /* USER CODE END TIMER_IF_DelayMs */ uint32_t delayTicks = TIMER_IF_Convert_ms2Tick(delay); uint32_t timeout = GetTimerTicks(); /* Wait delay ms */ while (((GetTimerTicks() - timeout)) < delayTicks) { __NOP(); } /* USER CODE BEGIN TIMER_IF_DelayMs_Last */ /* USER CODE END TIMER_IF_DelayMs_Last */ }

My project provide the HAL_Delay(Delay) via a call to the TIMER_IF_DelayMs(Delay) defined in the timer_if.c 
But the code is not the same and the HAL_Delay return without wating any delay.

void TIMER_IF_DelayMs(uint32_t delay) { /* USER CODE BEGIN TIMER_IF_DelayMs */ /* USER CODE END TIMER_IF_DelayMs */ }

I cannot find where I can configure the project to duplicate the configuration of the  "SubGHz_Phy_Per" project.

I already try to change the "System Core / SYS / Timebase Source" between None and SysTick but it didn't change anything.
Could you help me ?
Best Regards
Matthieu

0 REPLIES 0