Skip to main content
Visitor II
September 19, 2024
Solved

STM32F746 : SW not running well without debugger

  • September 19, 2024
  • 3 replies
  • 1787 views

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 ?

    This topic has been closed for replies.
    Best answer by ABITT.1

    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

    3 replies

    Graduate II
    September 19, 2024

    Hi,

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

    ABITT.1Author
    Visitor II
    September 24, 2024

    Hi SMarie,

     

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

     

    thanks 

    Super User
    September 19, 2024

    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.1AuthorAnswer
    Visitor II
    September 19, 2024

    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

    Super User
    September 19, 2024

    @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 

    Super User
    September 19, 2024

    @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!