cancel
Showing results for 
Search instead for 
Did you mean: 

Program stuck at memory STM32H750XB based board

Caan
Senior

I have successfully tested the board that is based on STM32H750B-DK Architecture using Touchgfx based code demo for STM32H750B-DK but now I have created a fresh stm32cubemx project with same files and settings and same ld as of the demo board but the Code is getting stucked at the 

static int32_t MT48LC4M32B2_Delay(uint32_t Delay)

{

uint32_t tickstart;

tickstart = HAL_GetTick();

while((HAL_GetTick() - tickstart) < Delay)

{

}

return MT48LC4M32B2_OK;

}

What could be the problem?

9 REPLIES 9
mayurharge
Associate II

first of all describe weather you are using demo board or different board
if you are using custom made board then most probably your cube mx clock config is not matching the hardware clock.
use below code block to check weather dbgTick is incrementing or not or how slow its incrementing

static int32_t MT48LC4M32B2_Delay(uint32_t Delay)

{

uint32_t tickstart;
uint32_t dbgTick;
tickstart = HAL_GetTick();

while((HAL_GetTick() - tickstart) < Delay)
{
     dbgTick = HAL_GetTick();

}

return MT48LC4M32B2_OK;

}

 

TDK
Super User

There's nothing wrong in the code you posted.

If the two projects were the same, they would behave the same. I suggest doing a diff of both projects to find the differences.

If you feel a post has answered your question, please click "Accept as Solution".

I have checked several times but couldn't find anything that might be wrong.
PS I am using 1024x600 TFT instead of 480x272 Default TFT.
LD is  same as of the demoboard



dbgTick=0 no changes there during debugging.
Now I have changed the priority of tim6 to 0 as per the demo code and now the following is shown

If clock config is correct then your code is getting stuck somewhere else.

Best way is to add breakpoints and check at which function block your code is getting stuck.

 

Debugger is showing the following.

Your code is getting stuck in init process only 

Add debugging info near the breakpoints to understand whats happening exactly 

From your previous reply halgettick was not incremting points towards clock config issue 

Go through congratulation thoroughly and it will solve the issue.

I cant help with the little information you have provided.

TDK
Super User

It's in an interrupt. Look at VECTACTIVE in SCB to see which one it's in. Probably something is not implemented.

If you feel a post has answered your question, please click "Accept as Solution".

My crystal ball tip: you call in main sooner MX_FMC_Init as timer init for hal gettick = tick is stopped.