cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 : SW not running well without debugger

ABITT.1
Associate III

Hi,

I designed a sw on STM32F746 with STM32CubeIDE.

Some functions work fine when I use the debugger (ST-LINK) but this same functions halts when I don't use the debugger !

I play se sequence hereafter :

 - run the sw using debugger : execution ok

- exit de debugger session into the STM32CubeIDE, the sw still running well

- disconnect physically the ST-LINK, the sw still running well

- reset my board, the functions halt before end execution !!! (others functions work fine)

 

Someone can help me, please ?

1 ACCEPTED SOLUTION

Accepted Solutions
ABITT.1
Associate III

Sorry for my sollicitation but I found the origin of my problem.
It's my delay procedure based on DWT who blocked some time.
I replaced with the HAL_Delay() and it work fine.

I've not understood why the debugger mask the problem and done that it work normally

 

This ticket can be closed

View solution in original post

8 REPLIES 8
SMarie
Senior

Hi,

We'd need more context.
Could you show us some code ? What are you trying to do ? Where does the code stops ?

Provide some instrumentation which allows you to see what your code is doing when the debugger is not connected.

eg, UART, LEDs, etc ...

In particular, make sure that your Hard Fault handler, and any other error handler(s) give a clear clear indication when they "fire"

ABITT.1
Associate III

Sorry for my sollicitation but I found the origin of my problem.
It's my delay procedure based on DWT who blocked some time.
I replaced with the HAL_Delay() and it work fine.

I've not understood why the debugger mask the problem and done that it work normally

 

This ticket can be closed


@ABITT.1 wrote:

This ticket can be closed


You do that by marking the solution:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

 


@ABITT.1 wrote:

Sorry for my sollicitation but I found the origin of my problem.
It's my delay procedure based on DWT who blocked some time.
I replaced with the HAL_Delay() and it work fine.

I've not understood why the debugger mask the problem and done that it work normally


To understand that, you'd need to give more detail - in particular, show your code

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228 

@ABITT.1 The post that you mark as the solution should be one which actually gives the solution!

That would be your post - not mine!

I'm sorry but I'd give feedback at all contributors

Hi SMarie,

 

I've resolved my problem, it was my wait who not work well.

 

thanks 

Sorry Andrew but I have some difficulties to understand how the forum work.

I've resolved my problem, my wait don't work well. It's ok now.

 

thanks