cancel
Showing results for 
Search instead for 
Did you mean: 

Hal_GetTick counting error When Run or Debug the Project(For NUCLEO_L4Z5ZI)

MTasd.1
Associate

I m using NUCLEO_L4Z5ZI and When i debug or run the code to microcontroller and compiler start to run HAL_DELAY line, HAL_DELAY is staying infinity loop and rest of code can not run or Sometime, MCU is meeting after I pressed to Debug or Run button. But when i plug out to USB cable from NUCLEO_L4Z5ZI and plug in to it again, HAL_DELAY function works well.I try to debug or run the code to it again, I m getting the same problem again until i plug out.(If i make some grammer mistakes, i am apologize to you.

Explaining problem with video : https://youtu.be/sJRU0cPavT0

myProject Github : https://github.com/mmtcoder/Nucleo-L4R5ZI-Debugging-or-Running-Fault

0693W00000FDYKBQA5.png0693W00000FDYK6QAP.png

3 REPLIES 3
MM..1
Chief II

On your images i dont see any   code can not compile You maybe mean not run.

Use HAL_Delay need special care. Not use it in ISR and need timebase system (uwtick manager) started before use.

I checked againg it is cause of DCMI libraries. When i disable DCMI, HAL_Delay works well but this is not solve my problem either I need to solve this problem or to make frame capture algorithm manually.

yldzmuhammed
Associate III

First of all, there are so many confusing declarations in your sentences. What exactly is your problem? Does your code run but your tick counter does not increase? Does your program crashes and go to one of the FaultHandlers? What exactly is your problem?