Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6066701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:31:44+00:00 2026-05-23T09:31:44+00:00

Reset interrupt vector SYSRSTIV is set to 001Eh (peripheral/configuration area fetch – PERF) even

  • 0

Reset interrupt vector SYSRSTIV is set to 001Eh (peripheral/configuration area fetch – PERF) even before entering main. Why is this happening?

Device: MSP430F5418 (RAM: 16 K)
Compiler: IAR MSP430
Data Models tried: Both Medium and Large
Using FreeRTOS Version 7

Memory Statistics
48 444 bytes of CODE memory (+ 342 absolute ) 
14 678 bytes of DATA memory (+ 102 absolute ) 
14 150 bytes of CONST memory 

cstartup.s43 file used

#define DISABLE_WATCHDOG

#include "macros.m43"
#include "cfi.m43"

#ifdef DISABLE_WATCHDOG
#include "msp430.h"
#endif


#define XRSEGCSTART RSEG CSTART:CODE:NOROOT(1)

        XCFI_NAMES libNames
        XCFI_COMMON libCommon, libNames


// ---------------------------------------------------------
// The cstartup code -- call __low_level_init, perform initialization,
// call constructors and call main.  If main returns the exit system
// is started.
//

        MODULE  ?cstart

//
// Ensure that this is build with the same "positions independent
// code" settings as the compiler uses.
//

        XPICRTMODEL


//
// Forward declarations of segments.
//

        RSEG    HEAP:DATA:NOROOT(1)
        RSEG    CSTACK:DATA:NOROOT

        RSEG    DATA16_Z:DATA:NOROOT
        RSEG    DATA16_I:DATA:NOROOT
        RSEG    DATA16_ID:CONST:NOROOT
        RSEG    CODE_I:DATA:NOROOT
        RSEG    CODE_ID:CONST:NOROOT
#if __CORE__==__430X_CORE__
        RSEG    DATA20_Z:DATA:NOROOT
        RSEG    DATA20_I:DATA:NOROOT
        RSEG    DATA20_ID:CONST:NOROOT
#endif

// ---------------------------------------------------------
// System initialization.
//

        XRSEGCSTART
        PUBLIC  __program_start_x

        EXTERN  ?reset_vector
        REQUIRE ?reset_vector

__program_start_x:

        PUBLIC ?cstart_begin
?cstart_begin:

        // --------------------
        // Turn off the watchdog.
        //
        // Note: This is excluded by default. Please define
        // DISABLE_WATCHDOG to include it.
        //

#ifdef DISABLE_WATCHDOG

        MOV     #WDTPW + WDTHOLD, &WDTCTL
#endif

        // --------------------
        // Initialize SP to point to the top of the stack.
        //
        MOV     #SFE(CSTACK), SP

        //
        // Ensure that main is called.
        //
        REQUIRE ?cstart_call_main


// -----------------------------------------------
// Call __low_level_init to perform initialization before initializing
// segments and calling main. If the function returns 0 no segment
// initialization should take place.
//
// Link with your own version of __low_level_init to override the
// default action: to do nothing but return 1.
//

        XRSEGCSTART

        PUBLIC  ?cstart_call_low_level_init
        EXTERN  __low_level_init

?cstart_call_low_level_init:
        XCALL   #__low_level_init
        CMP     #0, W0
        JEQ     ?cstart_call_main


// -----------------------------------------------
// Segment initialization:
//
// xxx_Z  -- uninitialized data that are filled with zeros.
// xxx_I  -- initialized data that gets the values from the corresponding
//           xxx_ID segment.
//

#ifndef IGNORE_SEG_INIT


        // --------------------
        // Initialize code for __ramfunc functions.
        //

        XRSEGCSTART
        PUBLIC  ?cstart_init_copy_ramfunc

?cstart_init_copy_ramfunc:

#ifndef IGNORE_RAMFUNC_INIT

#ifndef REGISTER_MODEL_REG20

        MOV     #SFB CODE_I,  CW0
        MOV     #SFB CODE_ID, CW1

        MOV     #sizeof CODE_I, CW2

        XCALL   #__data16_memcpy

#else  // MSP430X with 20 bit pointers.

        EXTERN  __data20_memcpy

        MOVA    #SFB CODE_I,  CW0
        MOVA    #SFB CODE_ID, CW1
        MOV.W   #LWRD(sizeof CODE_I), L1L
        MOV.W   #HWRD(sizeof CODE_I), L1H

        XCALL   #__data20_memcpy


#endif // REGISTER_MODEL_REG20

#endif // IGNORE_RAMFUNC_INIT


        // --------------------
        // Initialize data16
        //

#ifndef IGNORE_DATA16_DATA

        //
        // Clear DATA16_Z.
        //

        XRSEGCSTART
        PUBLIC  ?cstart_init_zero
        EXTERN  __data16_memzero

?cstart_init_zero:
        MOV     #SFB DATA16_Z,    CW0
        MOV     #sizeof DATA16_Z, CW1

        XCALL   #__data16_memzero


        //
        // Copy DATA16_ID to DATA16_I
        //

        XRSEGCSTART
        PUBLIC  ?cstart_init_copy
        EXTERN  __data16_memcpy

?cstart_init_copy:
        MOV     #SFB DATA16_I,  CW0
        MOV     #SFB DATA16_ID, CW1

        MOV     #sizeof DATA16_I, CW2

        XCALL   #__data16_memcpy

#endif // IGNORE_DATA16_DATA


        // --------------------
        // Data20
        //

#if __CORE__==__430X_CORE__


#ifndef IGNORE_DATA20_DATA

        //
        // Clear DATA20_Z.
        //

        XRSEGCSTART
        PUBLIC  ?cstart_init_zero20
        EXTERN  __data20_memzero

?cstart_init_zero20:
        MOVA    #SFB DATA20_Z,W0
        MOV.W   #LWRD(sizeof DATA20_Z), L1L
        MOV.W   #HWRD(sizeof DATA20_Z), L1H

        XCALL   #__data20_memzero


        //
        // Copy DATA20_ID to DATA20_I
        //

        XRSEGCSTART
        PUBLIC  ?cstart_init_copy20
        EXTERN  __data20_memcpy

?cstart_init_copy20:
        MOVA    #SFB DATA20_I,  CW0
        MOVA    #SFB DATA20_ID, CW1
        MOV.W   #LWRD(sizeof DATA20_I), L1L
        MOV.W   #HWRD(sizeof DATA20_I), L1H

        XCALL   #__data20_memcpy

#endif // IGNORE_DATA16_DATA

#endif // MSP430X

#endif // IGNORE_SEG_INIT



// -----------------------------------------------
// Call constructors of static objects.
//

        RSEG    DIFUNCT:CONST:NOROOT(1)
        XRSEGCSTART
        PUBLIC  ?cstart_call_ctors

        EXTERN  __call_ctors

?cstart_call_ctors:

#ifdef REGISTER_MODEL_REG20

        MOVA    #SFB DIFUNCT, CW0
        MOVA    #SFE DIFUNCT, CW1

#else /* REGISTER_MODEL_REG20 */

        MOV.W   #SFB DIFUNCT, CW0
        MOV.W   #SFE DIFUNCT, CW1

#endif /* REGISTER_MODEL_REG20 */

        XCALL   #__call_ctors


// -----------------------------------------------
// Call main() with no arguments and then exit using the return value
// of main as the parameter.
//

        XRSEGCSTART
        PUBLIC  ?cstart_call_main

        EXTERN  main
        EXTERN  exit

?cstart_call_main:
        XCALL   #main
        XCALL   #exit

        PUBLIC  ?cstart_end
?cstart_end:

        // Note: "ENDMOD label" means code that this module is the
        // start of the application.
        ENDMOD  __program_start_x




// ---------------------------------------------------------
// __low_level_init
//
// The only action of this default version of __low_level_init is to
// return 1. By doing so it signals that normal initialization of data
// segments should be done.
//
// A customized version of __low_level_init may be created in order to
// perform initialization before initializing segments and calling main
// and/or to skip initialization of data segments under certain
// circumstances.
//
// For further details see sample file lowinit.c
//


        MODULE  lowinit

        PUBLIC  __low_level_init

        RSEG    CODE:CODE:NOROOT(1)

__low_level_init:
        MOV     #1, W0                  // By returning 1 this function
        XRET                            // indicates that the normal
                                        // initialization should take place

        ENDMOD


// ---------------------------------------------------------
// Define reset vector.
//

        MODULE  ?reset_vector

        RSEG    RESET:CONST:NOROOT(1)
        PUBLIC  ?reset_vector
        EXTERN  __program_start_x

?reset_vector:
        DC16    __program_start_x

        ENDMOD

        END
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:31:44+00:00Added an answer on May 23, 2026 at 9:31 am

    The issue has been resolved. We just deleted the project debug files of IAR compiler and rebuilt the project. SYSRSTIV is set to zero now and our application is running fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a binary file that I've disassembled using avr-objcopy. The interrupt vector table
Can a interrupt flag be set by the code as in the example below
While reset and checkout have different usages most of the time, I can't see
I am using YUI reset/base, after the reset it sets the ul and li
Is it possible to reset the alternate buffer in a vim session to what
I can reset FPU's CTRL registers with this: http://support.microsoft.com/kb/326219 But how can I save
How would I reset the primary key counter on a sql table and update
I want to reset stop word list in mysql for FULLTEXT search. I have
I need to reset a MySQL Field value automatically at midnight. It is a
I want to reset a file upload field when the user selects another option.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.