This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF

Dear all,

I have been working with a nRF51422 device for about two weeks, and everything went good. This morning, out of nothing, i got this error in IAR: Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF

My devboard is the PCA10028.

I've tried looking for other solutions here, but could not find any.

I've tried running nRFgo studio and reflashing the softdevice, the application, but nothing. I've tried running the blinky example, but that does not work either.

Do you have some other suggestions ?

Parents
  • I'm not sure what the problem could be, but here are a few of things you can try.

    Check if there is a code assertion:

    • Build without optimization and make sure that debug info is included in output (enable checkbox in project options -> C/C++ Compiler -> Output tab.
    • Add "DEBUG" to the list of pre-processor symbols in project options -> C/C++ Compiler -> preprocessor tab, see "defined symbols" field
    • Start a debug session, place a breakpoint at line ~113 in app_error.c and see if it gets reached. You can read out the error code and line number if it does.

    Make sure that --drv_vector_table_base=0x0 option is used:

    image description

    Try the uart example from a clean copy of the SDK and check if it still fails. Recommend to compare the project options with yours if that works.

Reply
  • I'm not sure what the problem could be, but here are a few of things you can try.

    Check if there is a code assertion:

    • Build without optimization and make sure that debug info is included in output (enable checkbox in project options -> C/C++ Compiler -> Output tab.
    • Add "DEBUG" to the list of pre-processor symbols in project options -> C/C++ Compiler -> preprocessor tab, see "defined symbols" field
    • Start a debug session, place a breakpoint at line ~113 in app_error.c and see if it gets reached. You can read out the error code and line number if it does.

    Make sure that --drv_vector_table_base=0x0 option is used:

    image description

    Try the uart example from a clean copy of the SDK and check if it still fails. Recommend to compare the project options with yours if that works.

Children
No Data
Related