Skip to main content
Visitor II
September 18, 2024
Solved

Hardfault error at timer callback

  • September 18, 2024
  • 2 replies
  • 1519 views

The thing is,i have a custom design board with STM32F446RE  and it's Nucleo variant
i have a code with multiple timers but when i run the program on my custom board it goes to Hardfault error after a timer callback but the same problem dosent happens with the Nucleo board although the code remains the same

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Don't discount bad design

    Make sure clock expectations are the same, make sure VCAP capacitors are correctly rated as designed/populated. You've got 4u7 F between them, and see 1.25V

    Check FLASH wait states.

    Root Cause the HARD FAULT, with a handler that does a better job than while(1) silently dying.

    2 replies

    Technical Moderator
    September 18, 2024

    Hello @Nirbhik and welcome to the community.


    @Nirbhik wrote:

    The thing is,i have a custom design board with STM32F446RE  and it's Nucleo variant.


    What do you mean by variant. is it Blue/Black pill board?

    Do you have the same Clock source and frequency values?

    NirbhikAuthor
    Visitor II
    September 19, 2024

    i have the NUCLEO-F446RE and yes i have the same clock source as i am using the same clock based on the internal oscillator

    Graduate II
    September 18, 2024

    Don't discount bad design

    Make sure clock expectations are the same, make sure VCAP capacitors are correctly rated as designed/populated. You've got 4u7 F between them, and see 1.25V

    Check FLASH wait states.

    Root Cause the HARD FAULT, with a handler that does a better job than while(1) silently dying.

    NirbhikAuthor
    Visitor II
    September 19, 2024

    Yes i hadn't placed a capacitor at the Vcap pin 
    also about your last statement
    "Root Cause the HARD FAULT, with a handler that does a better job than while(1) silently dying."
    i use the debug tools of ST and i was able to pinpoint the error because of the call stack whose image i am attaching below