Skip to main content
y_gudekar
Associate III
July 16, 2008
Question

HardFaultException in STM32F103C6T6

  • July 16, 2008
  • 4 replies
  • 971 views
Posted on July 16, 2008 at 02:32

HardFaultException in STM32F103C6T6

    This topic has been closed for replies.

    4 replies

    y_gudekar
    y_gudekarAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:39

    Dear All,

    I am using STM32F103C6T6 in my application. i used IAR complier for development.

    In my application i call one function.

    Function is written to return value 1 or 0.

    After every power on after some time function return result into HardFaultException.

    what might be possible causes for it?

    How to resolve this problem?

    Under which condition HardFaultException will come?

    is it due to stack curruption or stack overflow?

    Regards.....

    Yogesh Gudekar

    y_gudekar
    y_gudekarAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:39

    Hi STOne-32,

    Please find in attchment IAR workspace which we are using in our application. i removed source file which we developed for our application.

    following is compiler version which we are using.

    IAR C/C++ Compiler for ARM

    4.42A Kickstart (4.42.1.301)

    C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\bin\iccarm.exe

    6/13/2007 11:06:12 AM, 10763776 bytes

    piece of code which generate HardFaultException is attched as source_code.doc

    What do you think , the problem which i am facing is due to some coding mistake or due to some compiler setting mistake?

    Regards...

    Yogesh Gudekar

    y_gudekar
    y_gudekarAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:39

    Dear All,

    Please inform me exact steps i need to follow to solve hardfaultexception.

    Regards..

    Yogesh Gudekar

    16-32micros
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:39

    Dear Yogesh,

    Could you provide your environement setup : which version of IAR, which piece of software is generating the hard-fault, you can try yo step your program by using breakpoints and then identify what is going before getting the hard fault exeption.

    Cheers,

    STOne-32.