2015-12-03 10:58 PM
Hi,
I called HAL_Delay(500); but inside the function, the return value of HAL_GetTick() is zero. What can be wrong? Thanks in advance.EDIT : oops, when I set a break point at line A below, I see tickstart is always 0 even when I press F10 keys many times because it can never progress. If I remove the break point and set a breakpoint there later, I see increased tickstart value. Because I called HAL_Delay(500); inside while loop, every time I see increment, it is incremented in unit of 500 ticks. I was confused by the way debugger works.__weak void HAL_Delay(__IO uint32_t Delay){ uint32_t tickstart = 0; tickstart = HAL_GetTick(); while((HAL_GetTick() - tickstart) < Delay) <=== line A { }}Chan2015-12-04 05:27 AM
Can we keep this in [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/HAL_Delay%28%29%20not%20working.%20help%20%28newbie%29&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=16]ONE thread?