This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 - Silicon Erratasheet - USCI28 - Workaround

Other Parts Discussed in Thread: MSP430F2132

Hi together,

My environment

Target:            MSP430F2132
IDE:                Code Composer Studio v5
Compiler:        MSP430 v4.1.1

My problem

I want to implement the workaround for the Bug USCI28 of the Device Erratasheet (see www.ti.com/lit/pdf/slaz163 ). My decision was made to paragraph 3 with modifying the boot.c file. I followed the instruction exactly but now there's to few space:

Error:  program will not fit into available


My question

  • Does the possibility exists to enlarge the memory of the RESET vector?
  • Is there another way to solve the problem?

Thank you guys,

Sven

  • It sounds like you've ended up with two interrupt service routines defined for the reset vector. Perhaps the linker is still finding the original version as well as the modified one created by following the workaround instructions.
  • I checked it without success, the same error occurs. Here is my modificated boot.c file (the section is commented out):

    boot.c
    /*****************************************************************************/
    /* BOOT.C   v4.1.1 - Initialize the MSP430 C runtime environment             */
    /*                                                                           */
    /* Copyright (c) 2003-2012 Texas Instruments Incorporated                    */
    /* http://www.ti.com/                                                        */
    /*                                                                           */
    /*  Redistribution and  use in source  and binary forms, with  or without    */
    /*  modification,  are permitted provided  that the  following conditions    */
    /*  are met:                                                                 */
    /*                                                                           */
    /*     Redistributions  of source  code must  retain the  above copyright    */
    /*     notice, this list of conditions and the following disclaimer.         */
    /*                                                                           */
    /*     Redistributions in binary form  must reproduce the above copyright    */
    /*     notice, this  list of conditions  and the following  disclaimer in    */
    /*     the  documentation  and/or   other  materials  provided  with  the    */
    /*     distribution.                                                         */
    /*                                                                           */
    /*     Neither the  name of Texas Instruments Incorporated  nor the names    */
    /*     of its  contributors may  be used to  endorse or  promote products    */
    /*     derived  from   this  software  without   specific  prior  written    */
    /*     permission.                                                           */
    /*                                                                           */
    /*  THIS SOFTWARE  IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS    */
    /*  "AS IS"  AND ANY  EXPRESS OR IMPLIED  WARRANTIES, INCLUDING,  BUT NOT    */
    /*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR    */
    /*  A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT    */
    /*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,    */
    /*  SPECIAL,  EXEMPLARY,  OR CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT  NOT    */
    /*  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,    */
    /*  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    */
    /*  THEORY OF  LIABILITY, WHETHER IN CONTRACT, STRICT  LIABILITY, OR TORT    */
    /*  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE    */
    /*  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     */
    /*                                                                           */
    /*****************************************************************************/
    #include <stdlib.h>
    #include <_lock.h>
    
    extern int _args_main();
    extern int main(int argc);
    extern void exit(int status);
    extern void _auto_init();
    extern void __interrupt _c_int00();
    extern void __interrupt _c_int00_noargs();
    extern void __interrupt _c_int00_noinit();
    extern void __interrupt _c_int00_noexit();
    extern void __interrupt _c_int00_noinit_noexit();
    extern void __interrupt _c_int00_mpu_init();
    extern void __interrupt _c_int00_noargs_mpu_init();
    extern void __interrupt _c_int00_noinit_mpu_init();
    extern void __interrupt _c_int00_noexit_mpu_init();
    extern void __interrupt _c_int00_noinit_noexit_mpu_init();
    extern int  _system_pre_init(void);
    
    void              (*_cleanup_ptr)(void);
    void _DATA_ACCESS (*_dtors_ptr)(int);
    
    /*---------------------------------------------------------------------------*/
    /* Allocate the memory for the system stack.  This section will be sized     */
    /* by the linker.                                                            */
    /*---------------------------------------------------------------------------*/
    __asm("\t.global __STACK_END");
    #pragma DATA_SECTION (_stack, ".stack");
    #if defined(__LARGE_DATA_MODEL__)
    long _stack;
    #else
    int _stack;
    #endif
    
    /*---------------------------------------------------------------------------*/
    /*  Initialize reset vector to point at _c_int00                             */
    /*  _c_int00 must always be located in low-memory on MSP430X devices.        */
    /*---------------------------------------------------------------------------*/
    #if defined(__LARGE_CODE_MODEL__)
    _Pragma("CODE_SECTION(_c_int00, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noargs, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noinit, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noexit, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noinit_noexit, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_mpu_init, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noargs_mpu_init, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noinit_mpu_init, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noexit_mpu_init, \".text:_isr\")")
    _Pragma("CODE_SECTION(_c_int00_noinit_noexit_mpu_init, \".text:_isr\")")
    #endif
    
    __asm("\t.global _reset_vector");
    __asm("\t.sect   \".reset\"");
    __asm("\t.align  2");
    __asm("_reset_vector:\n\t.field _c_int00, 16");
    
    
    /*---------------------------------------------------------------------------*/
    /* Modification for the Bug USCI28 Workaround								 */
    /*---------------------------------------------------------------------------*/
    //__asm("\t BIT.B\t #0x08,&0x0001"); // if TXIE is set, errant call occurred
    //__asm("\t JZ\t Start_Normal"); // if not start main program
    //__asm("\t RETI"); // else return from interrupt call
    //__asm("Start_Normal");
    
    /*---------------------------------------------------------------------------*/
    /* Macro to initialize stack pointer.  Stack grows towards lower memory.     */
    /*---------------------------------------------------------------------------*/
    #if defined(__LARGE_DATA_MODEL__)
    #define STACK_INIT() __asm("\t   MOVX.A\t   #__STACK_END,SP")
    #else
    #define STACK_INIT() __asm("\t   MOV.W\t    #__STACK_END,SP")
    #endif
    
    /*---------------------------------------------------------------------------*/
    /* Macros to initialize required global variables.                           */
    /*---------------------------------------------------------------------------*/
    #if defined(__TI_EABI__)
    #define INIT_EXIT_PTRS() do { } while(0)
    #define INIT_LOCKS()     do { } while(0)
    #else
    #define INIT_EXIT_PTRS() do { _cleanup_ptr = NULL; _dtors_ptr = NULL; } while(0)
    #define INIT_LOCKS()     do { _lock = _nop; _unlock = _nop; } while(0)
    #endif
    
    /*****************************************************************************/
    /* C_INT00() - C ENVIRONMENT ENTRY POINT                                     */
    /*****************************************************************************/
    #pragma CLINK(_c_int00)
    extern void __interrupt _c_int00()
    {
       STACK_INIT();
       
       INIT_EXIT_PTRS();
       INIT_LOCKS();
    
       /*------------------------------------------------------------------------*/
       /* Allow for any application-specific low level initialization prior to   */
       /* initializing the C/C++ environment (global variable initialization,    */
       /* constructers).  If _system_pre_init() returns 0, then bypass C/C++     */
       /* initialization.  NOTE: BYPASSING THE CALL TO THE C/C++ INITIALIZATION  */
       /* ROUTINE MAY RESULT IN PROGRAM FAILURE.                                 */
       /*------------------------------------------------------------------------*/
       if(_system_pre_init() != 0)  _auto_init();
    
       /*------------------------------------------------------------------------*/
       /* Handle any argc/argv arguments if supported by an MSP430 loader.       */
       /*------------------------------------------------------------------------*/
       _args_main();
    
       exit(1);
    }
    
    
    /*****************************************************************************/
    /* C_INT00_NOARGS() - Specialized version of _c_int00 that does not handle   */
    /*                    arguments passed to main.                              */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noargs)
    extern void __interrupt _c_int00_noargs()
    {
       STACK_INIT();
       INIT_EXIT_PTRS();
       INIT_LOCKS();
       if(_system_pre_init() != 0) _auto_init();
       main(0);
       exit(1);
    }
    
    /*****************************************************************************/
    /* C_INT00_NOINIT() - Specialized version of _c_int00 that does not perform  */
    /*                    auto initialization.                                   */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noinit)
    extern void __interrupt _c_int00_noinit()
    {
       STACK_INIT();
       INIT_EXIT_PTRS();
       INIT_LOCKS();
       _system_pre_init();
       _args_main();
       exit(1);
    }
    
    /*****************************************************************************/
    /* C_INT00_NOEXIT() - Specialized version of _c_int00 that directly calls    */
    /*                    abort and skips cleanup in exit.                       */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noexit)
    extern void __interrupt _c_int00_noexit()
    {
       STACK_INIT();
       INIT_LOCKS();
       if(_system_pre_init() != 0) _auto_init();
       main(0);
       abort();
    }
    
    /*****************************************************************************/
    /* C_INT00_NOINIT_NOEXIT() - Specialized version of _c_int00 that does not   */
    /*                           perform auto initialization and calls abort     */
    /*                           directly.                                       */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noinit_noexit)
    extern void __interrupt _c_int00_noinit_noexit()
    {
       STACK_INIT();
       INIT_LOCKS();
       _system_pre_init();
       main(0);
       abort();
    }
    
    extern volatile unsigned int MPUCTL0;
    extern volatile unsigned int MPUSEG;
    extern volatile unsigned int MPUSAM;
    
    extern unsigned int __mpuseg;
    extern unsigned int __mpusam;
    
    /*---------------------------------------------------------------------------*/
    /* Macro to initialize the FRAM MPU.                                         */
    /*---------------------------------------------------------------------------*/
    #define MPU_INIT() do { \
         MPUCTL0 = 0xA500;                           /* Unlock MPU             */ \
         MPUSEG  = (unsigned int)_symval(&__mpuseg); /* Set segment boundaries */ \
         MPUSAM  = (unsigned int)_symval(&__mpusam); /* Set RWX permissions    */ \
         MPUCTL0 = 0xA501;                           /* Enable MPU             */ \
       } while (0)
    
    /*****************************************************************************/
    /* C_INT00_MPU_INIT() - Specialized version of _c_int00 that initializes the */
    /*                      FRAM memory protection unit.                         */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_mpu_init)
    extern void __interrupt _c_int00_mpu_init()
    {
       MPU_INIT();
       STACK_INIT();
       INIT_EXIT_PTRS();
       INIT_LOCKS();
       if(_system_pre_init() != 0)  _auto_init();
       _args_main();
       exit(1);
    }
    
    /*****************************************************************************/
    /* C_INT00_NOARGS_MPU_INIT() - Specialized version of _c_int00 that          */ 
    /*                             initializes the FRAM memory protection unit   */
    /*                             and does not handle arguments passed to main. */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noargs_mpu_init)
    extern void __interrupt _c_int00_noargs_mpu_init()
    {
       MPU_INIT();
       STACK_INIT();
       INIT_EXIT_PTRS();
       INIT_LOCKS();
       if(_system_pre_init() != 0) _auto_init();
       main(0);
       exit(1);
    }
    
    /*****************************************************************************/
    /* C_INT00_NOINIT_MPU_INIT() - Specialized version of _c_int00 that          */
    /*                             initializes the FRAM memory protection unit   */
    /*                             and does not perform auto initialization.     */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noinit_mpu_init)
    extern void __interrupt _c_int00_noinit_mpu_init()
    {
       MPU_INIT();
       STACK_INIT();
       INIT_EXIT_PTRS();
       INIT_LOCKS();
       _system_pre_init();
       _args_main();
       exit(1);
    }
    
    /*****************************************************************************/
    /* C_INT00_NOEXIT_MPU_INIT() - Specialized version of _c_int00 that          */
    /*                             initializes the FRAM memory protection unit   */
    /*                             and directly calls abort and skips cleanup in */
    /*                             exit.                                         */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noexit_mpu_init)
    extern void __interrupt _c_int00_noexit_mpu_init()
    {
       MPU_INIT();
       STACK_INIT();
       INIT_LOCKS();
       if(_system_pre_init() != 0) _auto_init();
       main(0);
       abort();
    }
    
    /*****************************************************************************/
    /* C_INT00_NOINIT_NOEXIT_MPU_INIT() - Specialized version of _c_int00 that   */
    /*                                    initializes the FRAM memory protection */
    /*                                    unit and does not perform auto         */
    /*                                    initialization and calls abort         */
    /*                                    directly.                              */
    /*****************************************************************************/
    #pragma CLINK(_c_int00_noinit_noexit_mpu_init)
    extern void __interrupt _c_int00_noinit_noexit_mpu_init()
    {
       MPU_INIT();
       STACK_INIT();
       INIT_LOCKS();
       _system_pre_init();
       main(0);
       abort();
    }
    
    

    Do I have to delete a section from the file?

    I also would be happy with a reply directly from TI. When you assemble errors in your products, you should have workarounds that are easy to implement. Directed at TI not Robert!

    Thanks.

  • I think there might be a second copy of boot.c coming from the compiled RTS library. Have you tried a clean rebuild of the project? Also, in the build output folder there should be a .map file. Attaching that might reveal what the problem is.
  • You could be right. First I tried to compile the software including the workaround and it failed. After I deleted the content of the file and it worked.

    So can you give an advice to me how to solve the problem? I can't delete the boot.c file out of the rtssrc.zip folder because of other projects.

    Perhaps the .map files helps you:

    ProjectMSP.txt
    ******************************************************************************
                      MSP430 Linker PC v4.1.1                      
    ******************************************************************************
    >> Linked Tue Aug 11 16:06:01 2015
    
    OUTPUT FILE NAME:   <Project.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 0000ecfa
    
    
    MEMORY CONFIGURATION
    
             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      SFR                   00000000   00000010  00000000  00000010  RWIX
      PERIPHERALS_8BIT      00000010   000000f0  00000000  000000f0  RWIX
      PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX
      RAM                   00000200   00000200  000000bc  00000144  RWIX
      INFOD                 00001000   00000040  00000000  00000040  RWIX
      INFOC                 00001040   00000040  00000000  00000040  RWIX
      INFOB                 00001080   00000040  00000000  00000040  RWIX
      INFOA                 000010c0   00000040  00000000  00000040  RWIX
      FLASH                 0000e000   00001fe0  0000106e  00000f72  RWIX
      INT00                 0000ffe0   00000002  00000002  00000000  RWIX
      INT01                 0000ffe2   00000002  00000000  00000002  RWIX
      INT02                 0000ffe4   00000002  00000000  00000002  RWIX
      INT03                 0000ffe6   00000002  00000002  00000000  RWIX
      INT04                 0000ffe8   00000002  00000000  00000002  RWIX
      INT05                 0000ffea   00000002  00000002  00000000  RWIX
      INT06                 0000ffec   00000002  00000002  00000000  RWIX
      INT07                 0000ffee   00000002  00000002  00000000  RWIX
      INT08                 0000fff0   00000002  00000002  00000000  RWIX
      INT09                 0000fff2   00000002  00000002  00000000  RWIX
      INT10                 0000fff4   00000002  00000002  00000000  RWIX
      INT11                 0000fff6   00000002  00000000  00000002  RWIX
      INT12                 0000fff8   00000002  00000000  00000002  RWIX
      INT13                 0000fffa   00000002  00000002  00000000  RWIX
      INT14                 0000fffc   00000002  00000002  00000000  RWIX
      RESET                 0000fffe   00000002  00000002  00000000  RWIX
    
    
    SECTION ALLOCATION MAP
    
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .pinit     0    0000e000    00000000     UNINITIALIZED
    
    .bss       0    00000200    0000006c     UNINITIALIZED
                      00000200    00000022     main.obj (.bss)
                      00000222    0000001f     i2c.obj (.bss)
                      00000241    00000001     --HOLE--
                      00000242    00000012     pos.obj (.bss)
                      00000254    00000006     mode.obj (.bss)
                      0000025a    00000006     sys.obj (.bss)
                      00000260    00000004     rts430.lib : _lock.obj (.bss)
                      00000264    00000004                : boot.obj (.bss)
                      00000268    00000004     vbat.obj (.bss)
    
    .stack     0    000003b0    00000050     UNINITIALIZED
                      000003b0    00000002     rts430.lib : boot.obj (.stack)
                      000003b2    0000004e     --HOLE--
    
    .text      0    0000e000    00000fa0     
                      0000e000    000001da     mode.obj (.text:v_MODE_handleOperatingMode)
                      0000e1da    000001d8     pos.obj (.text:v_POS_updateCounter)
                      0000e3b2    0000016c     i2c.obj (.text:I2C_RxMsgPoll)
                      0000e51e    000000da     sys.obj (.text:v_SYS_configPorts)
                      0000e5f8    000000d2     pos.obj (.text:v_POS_recoverMTSystem)
                      0000e6ca    000000b6     i2c.obj (.text:USCIAB0_STATE_ISR)
                      0000e780    000000ac     i2c.obj (.text:I2C_TxMsgPoll)
                      0000e82c    0000008e     main.obj (.text:main)
                      0000e8ba    0000005a     mode.obj (.text:isr_MODE_PwGd)
                      0000e914    00000058     rts430.lib : div32u.obj (.text)
                      0000e96c    0000004c                : lsr16.obj (.text)
                      0000e9b8    0000004c     sys.obj (.text:v_SYS_resetDiagnose)
                      0000ea04    00000046     i2c.obj (.text:I2C_Init)
                      0000ea4a    00000046     rts430.lib : autoinit.obj (.text:_auto_init)
                      0000ea90    00000040     sys.obj (.text:isr_SYS_NMI)
                      0000ead0    00000040     rts430.lib : div32s.obj (.text)
                      0000eb10    0000003e     sys.obj (.text:v_SYS_startLFXT1)
                      0000eb4e    0000003e     vbat.obj (.text:v_VBAT_computeVinMin)
                      0000eb8c    0000003c     i2c.obj (.text:I2C_RxByteISR)
                      0000ebc8    00000036     i2c.obj (.text:I2C_Start)
                      0000ebfe    0000002c     i2c.obj (.text:I2C_Stop)
                      0000ec2a    0000002c     rts430.lib : lsl16.obj (.text)
                      0000ec56    0000002c     mode.obj (.text:v_MODE_setInitCommMode)
                      0000ec82    00000028     mode.obj (.text:v_MODE_setCommMode)
                      0000ecaa    00000028     sys.obj (.text:v_SYS_NMIActions)
                      0000ecd2    00000028     sys.obj (.text:v_SYS_checkFlashSegA)
                      0000ecfa    00000026     rts430.lib : boot.obj (.text:_c_int00_noexit)
                      0000ed20    00000026     interrupt_routine.obj (.text)
                      0000ed46    00000026     mode.obj (.text:v_MODE_initTimer1_A)
                      0000ed6c    00000026     mode.obj (.text:v_MODE_setupTAFastPwm)
                      0000ed92    00000026     mode.obj (.text:v_MODE_setupTASlowPwm)
                      0000edb8    00000024     mode.obj (.text:v_MODE_setCusaMode)
                      0000eddc    00000024     out.obj (.text:v_OUT_BattGood)
                      0000ee00    00000024     sys.obj (.text:v_SYS_setupBCL)
                      0000ee24    00000022     mode.obj (.text:v_MODE_setupTACommPwm)
                      0000ee46    00000022     out.obj (.text:v_OUT_Incremental)
                      0000ee68    00000020     vbat.obj (.text:isr_VBAT_ADC10)
                      0000ee88    00000020     vbat.obj (.text:v_VBAT_initTimer0_A)
                      0000eea8    0000001c     vbat.obj (.text:v_VBAT_restartVoltageMeasurement)
                      0000eec4    00000018     vbat.obj (.text:v_VBAT_stopTimer0_A)
                      0000eedc    00000016     mode.obj (.text:v_MODE_stopTimer1_A)
                      0000eef2    00000014     mode.obj (.text:isr_MODE_Watchdog)
                      0000ef06    00000014     vbat.obj (.text:v_VBAT_stopADC10)
                      0000ef1a    00000012     rts430.lib : memcpy.obj (.text:memcpy)
                      0000ef2c    00000010                : epilog.obj (.text)
                      0000ef3c    00000010     mode.obj (.text:v_MODE_setFastMode)
                      0000ef4c    00000010     mode.obj (.text:v_MODE_setSlowMode)
                      0000ef5c    00000010     mode.obj (.text:v_MODE_setupWDT)
                      0000ef6c    0000000e     vbat.obj (.text:isr_VBAT_startADCconv)
                      0000ef7a    0000000e     vbat.obj (.text:v_VBAT_setupADC10)
                      0000ef88    0000000c     vbat.obj (.text:isr_VBAT_ADCREFenable)
                      0000ef94    00000004     rts430.lib : pre_init.obj (.text:_system_pre_init)
                      0000ef98    00000004                : exit.obj (.text:abort)
                      0000ef9c    00000002     i2c.obj (.text:USCI29BUG_ISR)
                      0000ef9e    00000002     rts430.lib : _lock.obj (.text:_nop)
    
    .const     0    0000efa0    0000006c     
                      0000efa0    00000040     main.obj (.const:tHtData)
                      0000efe0    00000020     pos.obj (.const:regions)
                      0000f000    00000008     out.obj (.const:IncOut)
                      0000f008    00000004     main.obj (.const)
    
    .cinit     0    0000f00c    00000062     
                      0000f00c    00000024     i2c.obj (.cinit)
                      0000f030    00000012     main.obj (.cinit)
                      0000f042    0000000c     mode.obj (.cinit)
                      0000f04e    0000000c     pos.obj (.cinit)
                      0000f05a    0000000c     sys.obj (.cinit)
                      0000f066    00000006     vbat.obj (.cinit)
                      0000f06c    00000002     --HOLE-- [fill = 0]
    
    .int00     0    0000ffe0    00000002     
                      0000ffe0    00000002     i2c.obj (.int00)
    
    .int03     0    0000ffe6    00000002     
                      0000ffe6    00000002     mode.obj (.int03)
    
    .int05     0    0000ffea    00000002     
                      0000ffea    00000002     vbat.obj (.int05)
    
    .int06     0    0000ffec    00000002     
                      0000ffec    00000002     i2c.obj (.int06)
    
    .int07     0    0000ffee    00000002     
                      0000ffee    00000002     i2c.obj (.int07)
    
    .int08     0    0000fff0    00000002     
                      0000fff0    00000002     vbat.obj (.int08)
    
    .int09     0    0000fff2    00000002     
                      0000fff2    00000002     vbat.obj (.int09)
    
    .int10     0    0000fff4    00000002     
                      0000fff4    00000002     mode.obj (.int10)
    
    .int13     0    0000fffa    00000002     
                      0000fffa    00000002     interrupt_routine.obj (.int13)
    
    .int14     0    0000fffc    00000002     
                      0000fffc    00000002     sys.obj (.int14)
    
    .reset     0    0000fffe    00000002     
                      0000fffe    00000002     rts430.lib : boot.obj (.reset)
    
    
    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name 
    
    address    name
    --------   ----
    00000200   .bss
    0000e000   .text
    0000004a   ADC10AE0
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    00000057   BCSCTL1
    00000058   BCSCTL2
    00000053   BCSCTL3
    0000ef98   C$$EXIT
    000010fb   CALBC1_12MHZ
    000010f9   CALBC1_16MHZ
    000010ff   CALBC1_1MHZ
    000010fd   CALBC1_8MHZ
    000010fa   CALDCO_12MHZ
    000010f8   CALDCO_16MHZ
    000010fe   CALDCO_1MHZ
    000010fc   CALDCO_8MHZ
    00000056   DCOCTL
    0000025c   ErrCode
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    0000ea04   I2C_Init
    0000eb8c   I2C_RxByteISR
    0000e3b2   I2C_RxMsgPoll
    0000ebc8   I2C_Start
    0000ebfe   I2C_Stop
    0000e780   I2C_TxMsgPoll
    00000000   IE1
    00000001   IE2
    00000002   IFG1
    00000003   IFG2
    0000ec2a   I_LSL
    0000ec52   I_LSL_1
    0000ec40   I_LSL_10
    0000ec3e   I_LSL_11
    0000ec3c   I_LSL_12
    0000ec3a   I_LSL_13
    0000ec38   I_LSL_14
    0000ec36   I_LSL_15
    0000ec50   I_LSL_2
    0000ec4e   I_LSL_3
    0000ec4c   I_LSL_4
    0000ec4a   I_LSL_5
    0000ec48   I_LSL_6
    0000ec46   I_LSL_7
    0000ec44   I_LSL_8
    0000ec42   I_LSL_9
    0000e96c   I_LSR
    0000e9b2   I_LSR_1
    0000e98e   I_LSR_10
    0000e98a   I_LSR_11
    0000e986   I_LSR_12
    0000e982   I_LSR_13
    0000e97e   I_LSR_14
    0000e97a   I_LSR_15
    0000e9ae   I_LSR_2
    0000e9aa   I_LSR_3
    0000e9a6   I_LSR_4
    0000e9a2   I_LSR_5
    0000e99e   I_LSR_6
    0000e99a   I_LSR_7
    0000e996   I_LSR_8
    0000e992   I_LSR_9
    0000f000   IncOut
    0000025e   LFXT1_ini_cnt
    00000248   MTC0
    0000024a   MTC1
    0000024c   MTC2
    00000022   P1DIR
    00000025   P1IE
    00000024   P1IES
    00000023   P1IFG
    00000020   P1IN
    00000021   P1OUT
    00000027   P1REN
    00000026   P1SEL
    00000041   P1SEL2
    0000002a   P2DIR
    0000002d   P2IE
    0000002c   P2IES
    0000002b   P2IFG
    00000028   P2IN
    00000029   P2OUT
    0000002f   P2REN
    0000002e   P2SEL
    00000042   P2SEL2
    0000001a   P3DIR
    00000018   P3IN
    00000019   P3OUT
    00000010   P3REN
    0000001b   P3SEL
    00000043   P3SEL2
    00000252   PHall_save
    00000246   R5_inval_flag
    00000172   TA0CCR0
    00000174   TA0CCR1
    00000176   TA0CCR2
    00000162   TA0CCTL0
    00000164   TA0CCTL1
    00000166   TA0CCTL2
    00000160   TA0CTL
    0000012e   TA0IV
    00000170   TA0R
    00000192   TA1CCR0
    00000194   TA1CCR1
    00000196   TA1CCR2
    00000182   TA1CCTL0
    00000184   TA1CCTL1
    00000186   TA1CCTL2
    00000180   TA1CTL
    0000011e   TA1IV
    00000190   TA1R
    00000200   Temperature
    0000005d   UCA0ABCTL
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    0000005f   UCA0IRRCTL
    0000005e   UCA0IRTCTL
    00000064   UCA0MCTL
    00000066   UCA0RXBUF
    00000065   UCA0STAT
    00000067   UCA0TXBUF
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006c   UCB0I2CIE
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000006e   UCB0RXBUF
    0000006d   UCB0STAT
    0000006f   UCB0TXBUF
    0000ef9c   USCI29BUG_ISR
    0000e6ca   USCIAB0_STATE_ISR
    00000268   Vin
    0000026a   Vin_min
    00000120   WDTCTL
    00000400   __STACK_END
    00000050   __STACK_SIZE
    00000001   __TI_args_main
    00000001   __TI_auto_init
    00000001   __TI_exit
    ffffffff   __binit__
    00000200   __bss__
    ffffffff   __c_args__
    0000f00c   __cinit__
    0000ead0   __divli
    0000e914   __divul
    0000026c   __end__
    0000efa0   __etext__
    ffffffff   __pinit__
    0000ead0   __remli
    0000e914   __remul
    0000e000   __text__
    0000ea4a   _auto_init
    0000ecfa   _c_int00
    0000ecfa   _c_int00_noexit
    00000264   _cleanup_ptr
    00000266   _dtors_ptr
    00000260   _lock
    0000ef9e   _nop
    0000fffe   _reset_vector
    000003b0   _stack
    0000ef94   _system_pre_init
    00000262   _unlock
    0000ef98   abort
    0000023f   bI2cTxStart
    00000240   bI2cTxStop
    ffffffff   binit
    0000f00c   cinit
    00000242   cntr_update_flag
    0000f008   culVersion
    0000026c   end
    0000efa0   etext
    0000ef38   func_epilog_1
    0000ef36   func_epilog_2
    0000ef34   func_epilog_3
    0000ef32   func_epilog_4
    0000ef30   func_epilog_5
    0000ef2e   func_epilog_6
    0000ef2c   func_epilog_7
    0000e8ba   isr_MODE_PwGd
    0000eef2   isr_MODE_Watchdog
    0000ea90   isr_SYS_NMI
    0000ee68   isr_VBAT_ADC10
    0000ef88   isr_VBAT_ADCREFenable
    0000ef6c   isr_VBAT_startADCconv
    0000e82c   main
    0000ef1a   memcpy
    00000256   mode
    00000254   new_SR
    00000244   new_pos_available
    ffffffff   pinit
    00000202   port_readings
    00000258   powergood_flag
    00000232   pucRxDataByte
    0000023c   pucTxDataByte
    0000efe0   regions
    0000025a   status
    00000204   status_bits
    0000020a   tHtControlReg
    0000efa0   tHtData
    00000206   tHtStatusReg
    0000022a   tI2cRxBuf
    00000222   tI2cRxMsg
    00000234   tI2cTxMsg
    0000023e   ucHtRegIndex
    0000024e   ulAbsPosition
    0000021a   ulBattGoodMask
    0000020e   ulMtPosition
    00000216   ulPosOffset
    0000021e   ulUserReg
    00000212   ulWriteCnt
    0000e000   v_MODE_handleOperatingMode
    0000ed46   v_MODE_initTimer1_A
    0000ec82   v_MODE_setCommMode
    0000edb8   v_MODE_setCusaMode
    0000ef3c   v_MODE_setFastMode
    0000ec56   v_MODE_setInitCommMode
    0000ef4c   v_MODE_setSlowMode
    0000ee24   v_MODE_setupTACommPwm
    0000ed6c   v_MODE_setupTAFastPwm
    0000ed92   v_MODE_setupTASlowPwm
    0000ef5c   v_MODE_setupWDT
    0000eedc   v_MODE_stopTimer1_A
    0000eddc   v_OUT_BattGood
    0000ee46   v_OUT_Incremental
    0000e5f8   v_POS_recoverMTSystem
    0000e1da   v_POS_updateCounter
    0000ecaa   v_SYS_NMIActions
    0000ecd2   v_SYS_checkFlashSegA
    0000e51e   v_SYS_configPorts
    0000e9b8   v_SYS_resetDiagnose
    0000ee00   v_SYS_setupBCL
    0000eb10   v_SYS_startLFXT1
    0000eb4e   v_VBAT_computeVinMin
    0000ee88   v_VBAT_initTimer0_A
    0000eea8   v_VBAT_restartVoltageMeasurement
    0000ef7a   v_VBAT_setupADC10
    0000ef06   v_VBAT_stopADC10
    0000eec4   v_VBAT_stopTimer0_A
    
    
    GLOBAL SYMBOLS: SORTED BY Symbol Address 
    
    address    name
    --------   ----
    00000000   IE1
    00000001   IE2
    00000001   __TI_args_main
    00000001   __TI_auto_init
    00000001   __TI_exit
    00000002   IFG1
    00000003   IFG2
    00000010   P3REN
    00000018   P3IN
    00000019   P3OUT
    0000001a   P3DIR
    0000001b   P3SEL
    00000020   P1IN
    00000021   P1OUT
    00000022   P1DIR
    00000023   P1IFG
    00000024   P1IES
    00000025   P1IE
    00000026   P1SEL
    00000027   P1REN
    00000028   P2IN
    00000029   P2OUT
    0000002a   P2DIR
    0000002b   P2IFG
    0000002c   P2IES
    0000002d   P2IE
    0000002e   P2SEL
    0000002f   P2REN
    00000041   P1SEL2
    00000042   P2SEL2
    00000043   P3SEL2
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    0000004a   ADC10AE0
    00000050   __STACK_SIZE
    00000053   BCSCTL3
    00000056   DCOCTL
    00000057   BCSCTL1
    00000058   BCSCTL2
    0000005d   UCA0ABCTL
    0000005e   UCA0IRTCTL
    0000005f   UCA0IRRCTL
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000064   UCA0MCTL
    00000065   UCA0STAT
    00000066   UCA0RXBUF
    00000067   UCA0TXBUF
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    0000006c   UCB0I2CIE
    0000006d   UCB0STAT
    0000006e   UCB0RXBUF
    0000006f   UCB0TXBUF
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000011e   TA1IV
    00000120   WDTCTL
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    0000012e   TA0IV
    00000160   TA0CTL
    00000162   TA0CCTL0
    00000164   TA0CCTL1
    00000166   TA0CCTL2
    00000170   TA0R
    00000172   TA0CCR0
    00000174   TA0CCR1
    00000176   TA0CCR2
    00000180   TA1CTL
    00000182   TA1CCTL0
    00000184   TA1CCTL1
    00000186   TA1CCTL2
    00000190   TA1R
    00000192   TA1CCR0
    00000194   TA1CCR1
    00000196   TA1CCR2
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    00000200   .bss
    00000200   Temperature
    00000200   __bss__
    00000202   port_readings
    00000204   status_bits
    00000206   tHtStatusReg
    0000020a   tHtControlReg
    0000020e   ulMtPosition
    00000212   ulWriteCnt
    00000216   ulPosOffset
    0000021a   ulBattGoodMask
    0000021e   ulUserReg
    00000222   tI2cRxMsg
    0000022a   tI2cRxBuf
    00000232   pucRxDataByte
    00000234   tI2cTxMsg
    0000023c   pucTxDataByte
    0000023e   ucHtRegIndex
    0000023f   bI2cTxStart
    00000240   bI2cTxStop
    00000242   cntr_update_flag
    00000244   new_pos_available
    00000246   R5_inval_flag
    00000248   MTC0
    0000024a   MTC1
    0000024c   MTC2
    0000024e   ulAbsPosition
    00000252   PHall_save
    00000254   new_SR
    00000256   mode
    00000258   powergood_flag
    0000025a   status
    0000025c   ErrCode
    0000025e   LFXT1_ini_cnt
    00000260   _lock
    00000262   _unlock
    00000264   _cleanup_ptr
    00000266   _dtors_ptr
    00000268   Vin
    0000026a   Vin_min
    0000026c   __end__
    0000026c   end
    000003b0   _stack
    00000400   __STACK_END
    000010f8   CALDCO_16MHZ
    000010f9   CALBC1_16MHZ
    000010fa   CALDCO_12MHZ
    000010fb   CALBC1_12MHZ
    000010fc   CALDCO_8MHZ
    000010fd   CALBC1_8MHZ
    000010fe   CALDCO_1MHZ
    000010ff   CALBC1_1MHZ
    0000e000   .text
    0000e000   __text__
    0000e000   v_MODE_handleOperatingMode
    0000e1da   v_POS_updateCounter
    0000e3b2   I2C_RxMsgPoll
    0000e51e   v_SYS_configPorts
    0000e5f8   v_POS_recoverMTSystem
    0000e6ca   USCIAB0_STATE_ISR
    0000e780   I2C_TxMsgPoll
    0000e82c   main
    0000e8ba   isr_MODE_PwGd
    0000e914   __divul
    0000e914   __remul
    0000e96c   I_LSR
    0000e97a   I_LSR_15
    0000e97e   I_LSR_14
    0000e982   I_LSR_13
    0000e986   I_LSR_12
    0000e98a   I_LSR_11
    0000e98e   I_LSR_10
    0000e992   I_LSR_9
    0000e996   I_LSR_8
    0000e99a   I_LSR_7
    0000e99e   I_LSR_6
    0000e9a2   I_LSR_5
    0000e9a6   I_LSR_4
    0000e9aa   I_LSR_3
    0000e9ae   I_LSR_2
    0000e9b2   I_LSR_1
    0000e9b8   v_SYS_resetDiagnose
    0000ea04   I2C_Init
    0000ea4a   _auto_init
    0000ea90   isr_SYS_NMI
    0000ead0   __divli
    0000ead0   __remli
    0000eb10   v_SYS_startLFXT1
    0000eb4e   v_VBAT_computeVinMin
    0000eb8c   I2C_RxByteISR
    0000ebc8   I2C_Start
    0000ebfe   I2C_Stop
    0000ec2a   I_LSL
    0000ec36   I_LSL_15
    0000ec38   I_LSL_14
    0000ec3a   I_LSL_13
    0000ec3c   I_LSL_12
    0000ec3e   I_LSL_11
    0000ec40   I_LSL_10
    0000ec42   I_LSL_9
    0000ec44   I_LSL_8
    0000ec46   I_LSL_7
    0000ec48   I_LSL_6
    0000ec4a   I_LSL_5
    0000ec4c   I_LSL_4
    0000ec4e   I_LSL_3
    0000ec50   I_LSL_2
    0000ec52   I_LSL_1
    0000ec56   v_MODE_setInitCommMode
    0000ec82   v_MODE_setCommMode
    0000ecaa   v_SYS_NMIActions
    0000ecd2   v_SYS_checkFlashSegA
    0000ecfa   _c_int00
    0000ecfa   _c_int00_noexit
    0000ed46   v_MODE_initTimer1_A
    0000ed6c   v_MODE_setupTAFastPwm
    0000ed92   v_MODE_setupTASlowPwm
    0000edb8   v_MODE_setCusaMode
    0000eddc   v_OUT_BattGood
    0000ee00   v_SYS_setupBCL
    0000ee24   v_MODE_setupTACommPwm
    0000ee46   v_OUT_Incremental
    0000ee68   isr_VBAT_ADC10
    0000ee88   v_VBAT_initTimer0_A
    0000eea8   v_VBAT_restartVoltageMeasurement
    0000eec4   v_VBAT_stopTimer0_A
    0000eedc   v_MODE_stopTimer1_A
    0000eef2   isr_MODE_Watchdog
    0000ef06   v_VBAT_stopADC10
    0000ef1a   memcpy
    0000ef2c   func_epilog_7
    0000ef2e   func_epilog_6
    0000ef30   func_epilog_5
    0000ef32   func_epilog_4
    0000ef34   func_epilog_3
    0000ef36   func_epilog_2
    0000ef38   func_epilog_1
    0000ef3c   v_MODE_setFastMode
    0000ef4c   v_MODE_setSlowMode
    0000ef5c   v_MODE_setupWDT
    0000ef6c   isr_VBAT_startADCconv
    0000ef7a   v_VBAT_setupADC10
    0000ef88   isr_VBAT_ADCREFenable
    0000ef94   _system_pre_init
    0000ef98   C$$EXIT
    0000ef98   abort
    0000ef9c   USCI29BUG_ISR
    0000ef9e   _nop
    0000efa0   __etext__
    0000efa0   etext
    0000efa0   tHtData
    0000efe0   regions
    0000f000   IncOut
    0000f008   culVersion
    0000f00c   __cinit__
    0000f00c   cinit
    0000fffe   _reset_vector
    ffffffff   __binit__
    ffffffff   __c_args__
    ffffffff   __pinit__
    ffffffff   binit
    ffffffff   pinit
    
    [248 symbols]
    

    Project_WithWorkaround.txt
    ******************************************************************************
                      MSP430 Linker PC v4.1.1                      
    ******************************************************************************
    >> Linked Tue Aug 11 16:10:51 2015
    
    OUTPUT FILE NAME:   <Project.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 0000ecfa
    
    
    MEMORY CONFIGURATION
    
             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      SFR                   00000000   00000010  00000000  00000010  RWIX
      PERIPHERALS_8BIT      00000010   000000f0  00000000  000000f0  RWIX
      PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX
      RAM                   00000200   00000200  000000bc  00000144  RWIX
      INFOD                 00001000   00000040  00000000  00000040  RWIX
      INFOC                 00001040   00000040  00000000  00000040  RWIX
      INFOB                 00001080   00000040  00000000  00000040  RWIX
      INFOA                 000010c0   00000040  00000000  00000040  RWIX
      FLASH                 0000e000   00001fe0  0000106e  00000f72  RWIX
      INT00                 0000ffe0   00000002  00000002  00000000  RWIX
      INT01                 0000ffe2   00000002  00000000  00000002  RWIX
      INT02                 0000ffe4   00000002  00000000  00000002  RWIX
      INT03                 0000ffe6   00000002  00000002  00000000  RWIX
      INT04                 0000ffe8   00000002  00000000  00000002  RWIX
      INT05                 0000ffea   00000002  00000002  00000000  RWIX
      INT06                 0000ffec   00000002  00000002  00000000  RWIX
      INT07                 0000ffee   00000002  00000002  00000000  RWIX
      INT08                 0000fff0   00000002  00000002  00000000  RWIX
      INT09                 0000fff2   00000002  00000002  00000000  RWIX
      INT10                 0000fff4   00000002  00000002  00000000  RWIX
      INT11                 0000fff6   00000002  00000000  00000002  RWIX
      INT12                 0000fff8   00000002  00000000  00000002  RWIX
      INT13                 0000fffa   00000002  00000002  00000000  RWIX
      INT14                 0000fffc   00000002  00000002  00000000  RWIX
      RESET                 0000fffe   00000002  00000000  00000002  RWIX
    
    
    SECTION ALLOCATION MAP
    
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .pinit     0    0000e000    00000000     UNINITIALIZED
    
    .reset     0    00000000    0000000a     FAILED TO ALLOCATE
    .bss       0    00000200    0000006c     UNINITIALIZED
                      00000200    00000022     main.obj (.bss)
                      00000222    0000001f     i2c.obj (.bss)
                      00000241    00000001     --HOLE--
                      00000242    00000012     pos.obj (.bss)
                      00000254    00000006     mode.obj (.bss)
                      0000025a    00000006     sys.obj (.bss)
                      00000260    00000004     boot.obj (.bss)
                      00000264    00000004     rts430.lib : _lock.obj (.bss)
                      00000268    00000004     vbat.obj (.bss)
    
    .stack     0    000003b0    00000050     UNINITIALIZED
                      000003b0    00000002     boot.obj (.stack)
                      000003b2    0000004e     --HOLE--
    
    .text      0    0000e000    00000fa0     
                      0000e000    000001da     mode.obj (.text:v_MODE_handleOperatingMode)
                      0000e1da    000001d8     pos.obj (.text:v_POS_updateCounter)
                      0000e3b2    0000016c     i2c.obj (.text:I2C_RxMsgPoll)
                      0000e51e    000000da     sys.obj (.text:v_SYS_configPorts)
                      0000e5f8    000000d2     pos.obj (.text:v_POS_recoverMTSystem)
                      0000e6ca    000000b6     i2c.obj (.text:USCIAB0_STATE_ISR)
                      0000e780    000000ac     i2c.obj (.text:I2C_TxMsgPoll)
                      0000e82c    0000008e     main.obj (.text:main)
                      0000e8ba    0000005a     mode.obj (.text:isr_MODE_PwGd)
                      0000e914    00000058     rts430.lib : div32u.obj (.text)
                      0000e96c    0000004c                : lsr16.obj (.text)
                      0000e9b8    0000004c     sys.obj (.text:v_SYS_resetDiagnose)
                      0000ea04    00000046     i2c.obj (.text:I2C_Init)
                      0000ea4a    00000046     rts430.lib : autoinit.obj (.text:_auto_init)
                      0000ea90    00000040     sys.obj (.text:isr_SYS_NMI)
                      0000ead0    00000040     rts430.lib : div32s.obj (.text)
                      0000eb10    0000003e     sys.obj (.text:v_SYS_startLFXT1)
                      0000eb4e    0000003e     vbat.obj (.text:v_VBAT_computeVinMin)
                      0000eb8c    0000003c     i2c.obj (.text:I2C_RxByteISR)
                      0000ebc8    00000036     i2c.obj (.text:I2C_Start)
                      0000ebfe    0000002c     i2c.obj (.text:I2C_Stop)
                      0000ec2a    0000002c     rts430.lib : lsl16.obj (.text)
                      0000ec56    0000002c     mode.obj (.text:v_MODE_setInitCommMode)
                      0000ec82    00000028     mode.obj (.text:v_MODE_setCommMode)
                      0000ecaa    00000028     sys.obj (.text:v_SYS_NMIActions)
                      0000ecd2    00000028     sys.obj (.text:v_SYS_checkFlashSegA)
                      0000ecfa    00000026     boot.obj (.text:_c_int00_noexit)
                      0000ed20    00000026     interrupt_routine.obj (.text)
                      0000ed46    00000026     mode.obj (.text:v_MODE_initTimer1_A)
                      0000ed6c    00000026     mode.obj (.text:v_MODE_setupTAFastPwm)
                      0000ed92    00000026     mode.obj (.text:v_MODE_setupTASlowPwm)
                      0000edb8    00000024     mode.obj (.text:v_MODE_setCusaMode)
                      0000eddc    00000024     out.obj (.text:v_OUT_BattGood)
                      0000ee00    00000024     sys.obj (.text:v_SYS_setupBCL)
                      0000ee24    00000022     mode.obj (.text:v_MODE_setupTACommPwm)
                      0000ee46    00000022     out.obj (.text:v_OUT_Incremental)
                      0000ee68    00000020     vbat.obj (.text:isr_VBAT_ADC10)
                      0000ee88    00000020     vbat.obj (.text:v_VBAT_initTimer0_A)
                      0000eea8    0000001c     vbat.obj (.text:v_VBAT_restartVoltageMeasurement)
                      0000eec4    00000018     vbat.obj (.text:v_VBAT_stopTimer0_A)
                      0000eedc    00000016     mode.obj (.text:v_MODE_stopTimer1_A)
                      0000eef2    00000014     mode.obj (.text:isr_MODE_Watchdog)
                      0000ef06    00000014     vbat.obj (.text:v_VBAT_stopADC10)
                      0000ef1a    00000012     rts430.lib : memcpy.obj (.text:memcpy)
                      0000ef2c    00000010                : epilog.obj (.text)
                      0000ef3c    00000010     mode.obj (.text:v_MODE_setFastMode)
                      0000ef4c    00000010     mode.obj (.text:v_MODE_setSlowMode)
                      0000ef5c    00000010     mode.obj (.text:v_MODE_setupWDT)
                      0000ef6c    0000000e     vbat.obj (.text:isr_VBAT_startADCconv)
                      0000ef7a    0000000e     vbat.obj (.text:v_VBAT_setupADC10)
                      0000ef88    0000000c     vbat.obj (.text:isr_VBAT_ADCREFenable)
                      0000ef94    00000004     rts430.lib : pre_init.obj (.text:_system_pre_init)
                      0000ef98    00000004                : exit.obj (.text:abort)
                      0000ef9c    00000002     i2c.obj (.text:USCI29BUG_ISR)
                      0000ef9e    00000002     rts430.lib : _lock.obj (.text:_nop)
    
    .const     0    0000efa0    0000006c     
                      0000efa0    00000040     main.obj (.const:tHtData)
                      0000efe0    00000020     pos.obj (.const:regions)
                      0000f000    00000008     out.obj (.const:IncOut)
                      0000f008    00000004     main.obj (.const)
    
    .cinit     0    0000f00c    00000062     
                      0000f00c    00000024     i2c.obj (.cinit)
                      0000f030    00000012     main.obj (.cinit)
                      0000f042    0000000c     mode.obj (.cinit)
                      0000f04e    0000000c     pos.obj (.cinit)
                      0000f05a    0000000c     sys.obj (.cinit)
                      0000f066    00000006     vbat.obj (.cinit)
                      0000f06c    00000002     --HOLE-- [fill = 0]
    
    .int00     0    0000ffe0    00000002     
                      0000ffe0    00000002     i2c.obj (.int00)
    
    .int03     0    0000ffe6    00000002     
                      0000ffe6    00000002     mode.obj (.int03)
    
    .int05     0    0000ffea    00000002     
                      0000ffea    00000002     vbat.obj (.int05)
    
    .int06     0    0000ffec    00000002     
                      0000ffec    00000002     i2c.obj (.int06)
    
    .int07     0    0000ffee    00000002     
                      0000ffee    00000002     i2c.obj (.int07)
    
    .int08     0    0000fff0    00000002     
                      0000fff0    00000002     vbat.obj (.int08)
    
    .int09     0    0000fff2    00000002     
                      0000fff2    00000002     vbat.obj (.int09)
    
    .int10     0    0000fff4    00000002     
                      0000fff4    00000002     mode.obj (.int10)
    
    .int13     0    0000fffa    00000002     
                      0000fffa    00000002     interrupt_routine.obj (.int13)
    
    .int14     0    0000fffc    00000002     
                      0000fffc    00000002     sys.obj (.int14)
    
    
    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name 
    
    address    name
    --------   ----
    00000200   .bss
    0000e000   .text
    0000004a   ADC10AE0
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    00000057   BCSCTL1
    00000058   BCSCTL2
    00000053   BCSCTL3
    0000ef98   C$$EXIT
    000010fb   CALBC1_12MHZ
    000010f9   CALBC1_16MHZ
    000010ff   CALBC1_1MHZ
    000010fd   CALBC1_8MHZ
    000010fa   CALDCO_12MHZ
    000010f8   CALDCO_16MHZ
    000010fe   CALDCO_1MHZ
    000010fc   CALDCO_8MHZ
    00000056   DCOCTL
    0000025c   ErrCode
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    0000ea04   I2C_Init
    0000eb8c   I2C_RxByteISR
    0000e3b2   I2C_RxMsgPoll
    0000ebc8   I2C_Start
    0000ebfe   I2C_Stop
    0000e780   I2C_TxMsgPoll
    00000000   IE1
    00000001   IE2
    00000002   IFG1
    00000003   IFG2
    0000ec2a   I_LSL
    0000ec52   I_LSL_1
    0000ec40   I_LSL_10
    0000ec3e   I_LSL_11
    0000ec3c   I_LSL_12
    0000ec3a   I_LSL_13
    0000ec38   I_LSL_14
    0000ec36   I_LSL_15
    0000ec50   I_LSL_2
    0000ec4e   I_LSL_3
    0000ec4c   I_LSL_4
    0000ec4a   I_LSL_5
    0000ec48   I_LSL_6
    0000ec46   I_LSL_7
    0000ec44   I_LSL_8
    0000ec42   I_LSL_9
    0000e96c   I_LSR
    0000e9b2   I_LSR_1
    0000e98e   I_LSR_10
    0000e98a   I_LSR_11
    0000e986   I_LSR_12
    0000e982   I_LSR_13
    0000e97e   I_LSR_14
    0000e97a   I_LSR_15
    0000e9ae   I_LSR_2
    0000e9aa   I_LSR_3
    0000e9a6   I_LSR_4
    0000e9a2   I_LSR_5
    0000e99e   I_LSR_6
    0000e99a   I_LSR_7
    0000e996   I_LSR_8
    0000e992   I_LSR_9
    0000f000   IncOut
    0000025e   LFXT1_ini_cnt
    00000248   MTC0
    0000024a   MTC1
    0000024c   MTC2
    00000022   P1DIR
    00000025   P1IE
    00000024   P1IES
    00000023   P1IFG
    00000020   P1IN
    00000021   P1OUT
    00000027   P1REN
    00000026   P1SEL
    00000041   P1SEL2
    0000002a   P2DIR
    0000002d   P2IE
    0000002c   P2IES
    0000002b   P2IFG
    00000028   P2IN
    00000029   P2OUT
    0000002f   P2REN
    0000002e   P2SEL
    00000042   P2SEL2
    0000001a   P3DIR
    00000018   P3IN
    00000019   P3OUT
    00000010   P3REN
    0000001b   P3SEL
    00000043   P3SEL2
    00000252   PHall_save
    00000246   R5_inval_flag
    00000172   TA0CCR0
    00000174   TA0CCR1
    00000176   TA0CCR2
    00000162   TA0CCTL0
    00000164   TA0CCTL1
    00000166   TA0CCTL2
    00000160   TA0CTL
    0000012e   TA0IV
    00000170   TA0R
    00000192   TA1CCR0
    00000194   TA1CCR1
    00000196   TA1CCR2
    00000182   TA1CCTL0
    00000184   TA1CCTL1
    00000186   TA1CCTL2
    00000180   TA1CTL
    0000011e   TA1IV
    00000190   TA1R
    00000200   Temperature
    0000005d   UCA0ABCTL
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    0000005f   UCA0IRRCTL
    0000005e   UCA0IRTCTL
    00000064   UCA0MCTL
    00000066   UCA0RXBUF
    00000065   UCA0STAT
    00000067   UCA0TXBUF
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006c   UCB0I2CIE
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000006e   UCB0RXBUF
    0000006d   UCB0STAT
    0000006f   UCB0TXBUF
    0000ef9c   USCI29BUG_ISR
    0000e6ca   USCIAB0_STATE_ISR
    00000268   Vin
    0000026a   Vin_min
    00000120   WDTCTL
    00000400   __STACK_END
    00000050   __STACK_SIZE
    00000001   __TI_args_main
    00000001   __TI_auto_init
    00000001   __TI_exit
    ffffffff   __binit__
    00000200   __bss__
    ffffffff   __c_args__
    0000f00c   __cinit__
    0000ead0   __divli
    0000e914   __divul
    0000026c   __end__
    0000efa0   __etext__
    ffffffff   __pinit__
    0000ead0   __remli
    0000e914   __remul
    0000e000   __text__
    0000ea4a   _auto_init
    0000ecfa   _c_int00
    0000ecfa   _c_int00_noexit
    00000260   _cleanup_ptr
    00000262   _dtors_ptr
    00000264   _lock
    0000ef9e   _nop
    00000000   _reset_vector
    000003b0   _stack
    0000ef94   _system_pre_init
    00000266   _unlock
    0000ef98   abort
    0000023f   bI2cTxStart
    00000240   bI2cTxStop
    ffffffff   binit
    0000f00c   cinit
    00000242   cntr_update_flag
    0000f008   culVersion
    0000026c   end
    0000efa0   etext
    0000ef38   func_epilog_1
    0000ef36   func_epilog_2
    0000ef34   func_epilog_3
    0000ef32   func_epilog_4
    0000ef30   func_epilog_5
    0000ef2e   func_epilog_6
    0000ef2c   func_epilog_7
    0000e8ba   isr_MODE_PwGd
    0000eef2   isr_MODE_Watchdog
    0000ea90   isr_SYS_NMI
    0000ee68   isr_VBAT_ADC10
    0000ef88   isr_VBAT_ADCREFenable
    0000ef6c   isr_VBAT_startADCconv
    0000e82c   main
    0000ef1a   memcpy
    00000256   mode
    00000254   new_SR
    00000244   new_pos_available
    ffffffff   pinit
    00000202   port_readings
    00000258   powergood_flag
    00000232   pucRxDataByte
    0000023c   pucTxDataByte
    0000efe0   regions
    0000025a   status
    00000204   status_bits
    0000020a   tHtControlReg
    0000efa0   tHtData
    00000206   tHtStatusReg
    0000022a   tI2cRxBuf
    00000222   tI2cRxMsg
    00000234   tI2cTxMsg
    0000023e   ucHtRegIndex
    0000024e   ulAbsPosition
    0000021a   ulBattGoodMask
    0000020e   ulMtPosition
    00000216   ulPosOffset
    0000021e   ulUserReg
    00000212   ulWriteCnt
    0000e000   v_MODE_handleOperatingMode
    0000ed46   v_MODE_initTimer1_A
    0000ec82   v_MODE_setCommMode
    0000edb8   v_MODE_setCusaMode
    0000ef3c   v_MODE_setFastMode
    0000ec56   v_MODE_setInitCommMode
    0000ef4c   v_MODE_setSlowMode
    0000ee24   v_MODE_setupTACommPwm
    0000ed6c   v_MODE_setupTAFastPwm
    0000ed92   v_MODE_setupTASlowPwm
    0000ef5c   v_MODE_setupWDT
    0000eedc   v_MODE_stopTimer1_A
    0000eddc   v_OUT_BattGood
    0000ee46   v_OUT_Incremental
    0000e5f8   v_POS_recoverMTSystem
    0000e1da   v_POS_updateCounter
    0000ecaa   v_SYS_NMIActions
    0000ecd2   v_SYS_checkFlashSegA
    0000e51e   v_SYS_configPorts
    0000e9b8   v_SYS_resetDiagnose
    0000ee00   v_SYS_setupBCL
    0000eb10   v_SYS_startLFXT1
    0000eb4e   v_VBAT_computeVinMin
    0000ee88   v_VBAT_initTimer0_A
    0000eea8   v_VBAT_restartVoltageMeasurement
    0000ef7a   v_VBAT_setupADC10
    0000ef06   v_VBAT_stopADC10
    0000eec4   v_VBAT_stopTimer0_A
    
    
    GLOBAL SYMBOLS: SORTED BY Symbol Address 
    
    address    name
    --------   ----
    00000000   IE1
    00000000   _reset_vector
    00000001   IE2
    00000001   __TI_args_main
    00000001   __TI_auto_init
    00000001   __TI_exit
    00000002   IFG1
    00000003   IFG2
    00000010   P3REN
    00000018   P3IN
    00000019   P3OUT
    0000001a   P3DIR
    0000001b   P3SEL
    00000020   P1IN
    00000021   P1OUT
    00000022   P1DIR
    00000023   P1IFG
    00000024   P1IES
    00000025   P1IE
    00000026   P1SEL
    00000027   P1REN
    00000028   P2IN
    00000029   P2OUT
    0000002a   P2DIR
    0000002b   P2IFG
    0000002c   P2IES
    0000002d   P2IE
    0000002e   P2SEL
    0000002f   P2REN
    00000041   P1SEL2
    00000042   P2SEL2
    00000043   P3SEL2
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    0000004a   ADC10AE0
    00000050   __STACK_SIZE
    00000053   BCSCTL3
    00000056   DCOCTL
    00000057   BCSCTL1
    00000058   BCSCTL2
    0000005d   UCA0ABCTL
    0000005e   UCA0IRTCTL
    0000005f   UCA0IRRCTL
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000064   UCA0MCTL
    00000065   UCA0STAT
    00000066   UCA0RXBUF
    00000067   UCA0TXBUF
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    0000006c   UCB0I2CIE
    0000006d   UCB0STAT
    0000006e   UCB0RXBUF
    0000006f   UCB0TXBUF
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000011e   TA1IV
    00000120   WDTCTL
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    0000012e   TA0IV
    00000160   TA0CTL
    00000162   TA0CCTL0
    00000164   TA0CCTL1
    00000166   TA0CCTL2
    00000170   TA0R
    00000172   TA0CCR0
    00000174   TA0CCR1
    00000176   TA0CCR2
    00000180   TA1CTL
    00000182   TA1CCTL0
    00000184   TA1CCTL1
    00000186   TA1CCTL2
    00000190   TA1R
    00000192   TA1CCR0
    00000194   TA1CCR1
    00000196   TA1CCR2
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    00000200   .bss
    00000200   Temperature
    00000200   __bss__
    00000202   port_readings
    00000204   status_bits
    00000206   tHtStatusReg
    0000020a   tHtControlReg
    0000020e   ulMtPosition
    00000212   ulWriteCnt
    00000216   ulPosOffset
    0000021a   ulBattGoodMask
    0000021e   ulUserReg
    00000222   tI2cRxMsg
    0000022a   tI2cRxBuf
    00000232   pucRxDataByte
    00000234   tI2cTxMsg
    0000023c   pucTxDataByte
    0000023e   ucHtRegIndex
    0000023f   bI2cTxStart
    00000240   bI2cTxStop
    00000242   cntr_update_flag
    00000244   new_pos_available
    00000246   R5_inval_flag
    00000248   MTC0
    0000024a   MTC1
    0000024c   MTC2
    0000024e   ulAbsPosition
    00000252   PHall_save
    00000254   new_SR
    00000256   mode
    00000258   powergood_flag
    0000025a   status
    0000025c   ErrCode
    0000025e   LFXT1_ini_cnt
    00000260   _cleanup_ptr
    00000262   _dtors_ptr
    00000264   _lock
    00000266   _unlock
    00000268   Vin
    0000026a   Vin_min
    0000026c   __end__
    0000026c   end
    000003b0   _stack
    00000400   __STACK_END
    000010f8   CALDCO_16MHZ
    000010f9   CALBC1_16MHZ
    000010fa   CALDCO_12MHZ
    000010fb   CALBC1_12MHZ
    000010fc   CALDCO_8MHZ
    000010fd   CALBC1_8MHZ
    000010fe   CALDCO_1MHZ
    000010ff   CALBC1_1MHZ
    0000e000   .text
    0000e000   __text__
    0000e000   v_MODE_handleOperatingMode
    0000e1da   v_POS_updateCounter
    0000e3b2   I2C_RxMsgPoll
    0000e51e   v_SYS_configPorts
    0000e5f8   v_POS_recoverMTSystem
    0000e6ca   USCIAB0_STATE_ISR
    0000e780   I2C_TxMsgPoll
    0000e82c   main
    0000e8ba   isr_MODE_PwGd
    0000e914   __divul
    0000e914   __remul
    0000e96c   I_LSR
    0000e97a   I_LSR_15
    0000e97e   I_LSR_14
    0000e982   I_LSR_13
    0000e986   I_LSR_12
    0000e98a   I_LSR_11
    0000e98e   I_LSR_10
    0000e992   I_LSR_9
    0000e996   I_LSR_8
    0000e99a   I_LSR_7
    0000e99e   I_LSR_6
    0000e9a2   I_LSR_5
    0000e9a6   I_LSR_4
    0000e9aa   I_LSR_3
    0000e9ae   I_LSR_2
    0000e9b2   I_LSR_1
    0000e9b8   v_SYS_resetDiagnose
    0000ea04   I2C_Init
    0000ea4a   _auto_init
    0000ea90   isr_SYS_NMI
    0000ead0   __divli
    0000ead0   __remli
    0000eb10   v_SYS_startLFXT1
    0000eb4e   v_VBAT_computeVinMin
    0000eb8c   I2C_RxByteISR
    0000ebc8   I2C_Start
    0000ebfe   I2C_Stop
    0000ec2a   I_LSL
    0000ec36   I_LSL_15
    0000ec38   I_LSL_14
    0000ec3a   I_LSL_13
    0000ec3c   I_LSL_12
    0000ec3e   I_LSL_11
    0000ec40   I_LSL_10
    0000ec42   I_LSL_9
    0000ec44   I_LSL_8
    0000ec46   I_LSL_7
    0000ec48   I_LSL_6
    0000ec4a   I_LSL_5
    0000ec4c   I_LSL_4
    0000ec4e   I_LSL_3
    0000ec50   I_LSL_2
    0000ec52   I_LSL_1
    0000ec56   v_MODE_setInitCommMode
    0000ec82   v_MODE_setCommMode
    0000ecaa   v_SYS_NMIActions
    0000ecd2   v_SYS_checkFlashSegA
    0000ecfa   _c_int00
    0000ecfa   _c_int00_noexit
    0000ed46   v_MODE_initTimer1_A
    0000ed6c   v_MODE_setupTAFastPwm
    0000ed92   v_MODE_setupTASlowPwm
    0000edb8   v_MODE_setCusaMode
    0000eddc   v_OUT_BattGood
    0000ee00   v_SYS_setupBCL
    0000ee24   v_MODE_setupTACommPwm
    0000ee46   v_OUT_Incremental
    0000ee68   isr_VBAT_ADC10
    0000ee88   v_VBAT_initTimer0_A
    0000eea8   v_VBAT_restartVoltageMeasurement
    0000eec4   v_VBAT_stopTimer0_A
    0000eedc   v_MODE_stopTimer1_A
    0000eef2   isr_MODE_Watchdog
    0000ef06   v_VBAT_stopADC10
    0000ef1a   memcpy
    0000ef2c   func_epilog_7
    0000ef2e   func_epilog_6
    0000ef30   func_epilog_5
    0000ef32   func_epilog_4
    0000ef34   func_epilog_3
    0000ef36   func_epilog_2
    0000ef38   func_epilog_1
    0000ef3c   v_MODE_setFastMode
    0000ef4c   v_MODE_setSlowMode
    0000ef5c   v_MODE_setupWDT
    0000ef6c   isr_VBAT_startADCconv
    0000ef7a   v_VBAT_setupADC10
    0000ef88   isr_VBAT_ADCREFenable
    0000ef94   _system_pre_init
    0000ef98   C$$EXIT
    0000ef98   abort
    0000ef9c   USCI29BUG_ISR
    0000ef9e   _nop
    0000efa0   __etext__
    0000efa0   etext
    0000efa0   tHtData
    0000efe0   regions
    0000f000   IncOut
    0000f008   culVersion
    0000f00c   __cinit__
    0000f00c   cinit
    ffffffff   __binit__
    ffffffff   __c_args__
    ffffffff   __pinit__
    ffffffff   binit
    ffffffff   pinit
    
    [248 symbols]
    

    Had to change the file endings because of the TI upload rules...

  • Ok, those map files are interesting. When the workaround is not present the symbol _reset_vector is given the address 0xFFFE (ie the last word of flash memory). With the workaround it instead ends up at address 0x0. That's not in flash memory, it's in the address range of the special function registers (the SFR "IE1" lives at address zero).

    That explains why the linker is complaining: it can't place _reset_vector at 0x0 because IE1 is already at that address. That's just one symptom of the problem, however, the real issue is that _reset_vector is at address zero.

    Looking at the modified boot.c again I can see what the problem is. The USCI28 workaround instruction says "In the copy insert the [workaround] code prior to stack pointer initialization", which is a bit vague. You've put it before this code:

    /*---------------------------------------------------------------------------*/
    /* Macro to initialize stack pointer.  Stack grows towards lower memory.     */
    /*---------------------------------------------------------------------------*/
    #if defined(__LARGE_DATA_MODEL__)
    #define STACK_INIT() __asm("\t   MOVX.A\t   #__STACK_END,SP")
    #else
    #define STACK_INIT() __asm("\t   MOV.W\t    #__STACK_END,SP")
    #endif

    ...but that's not where the writer of the workaround intended. The workaround needs to go at the location marked here:

    /*****************************************************************************/
    /* C_INT00() - C ENVIRONMENT ENTRY POINT                                     */
    /*****************************************************************************/
    #pragma CLINK(_c_int00)
    extern void __interrupt _c_int00()
    {
    
       // <-- INSERT USCI28 WORKAROUND HERE
    
       STACK_INIT();

  • Thank you! It seems to be the solution of my problem. I can compile the project now without any error!

    So the next "problem" is: I want to test the workaround. But how can I force the error? My rendition of the USCI28 description is, that the error occurs accidentally.
    My system is configured as:
    CPU clock = 8 MHz
    I2C clock = 66 kHz

    Any further good idea?
  • If you have access to a digital pattern generator you can use that to emulate the I2C bus for the problem case. The timing window is quite tight though - in your case just 750ns after the interrupt flag is set.
  • That would be a good possibility to test the problem case. But now I punched in another question. You gave me the advice to put the workaround code in here (_c_int00):

    /*****************************************************************************/
    /* C_INT00() - C ENVIRONMENT ENTRY POINT                                     */
    /*****************************************************************************/
    #pragma CLINK(_c_int00)
    extern void __interrupt _c_int00()
    {
    <--- USCI28 BUG WORKAROUND STACK_INIT(); INIT_EXIT_PTRS(); INIT_LOCKS();

    But I made out, that my software jumps in the initialization function _c_int00_noexit(). And when I implemented the workaround code in there it seems to work. So does the program always jump in the  _c_int00_noexit() function after a reset or does it depend on what kind of reset occurred? Otherwise where is the definition of which initialization function will be used?

    Hope this will be my last question :) Thanks in advance!

  • Sven Flachm��ller said:
    So does the program always jump in the  _c_int00_noexit() function after a reset or does it depend on what kind of reset occurred?

    A given program will always jump to the same function after a reset.

    In order to minimize the code size, the compiler/linker can select a different reset function based upon which C run time library facilities are used by the program.

    e.g. with a simple "blink LED" example for a MSP430F2132, which didn't use any global variables, then TI compiler v4.4.5 selected _c_int00_noinit_noargs_noexit as the reset function. Where "noinit" means no global variable initialization and "noargs" means no arguments passed to main.

    Therefore, if your program is modified need to check that the work-around has been placed in the _c_init00 function which is being used.

  • It's probably safest to put the workaround in all versions of _c_init00. That way you won't get caught out if changes to your code make the compiler choose a different reset function.
  • Fortunately it's not possible. In this case the Label "Start_Normal" would be placed at several locations. That's the reason of not placing the workaround in the macro STACK_INIT(). A possibility would be to place the workaround in each _c_init00 function with different labels as target address. But I drop further adaptions. Thank you guys ;)
  • Sven Flachm��ller said:
    Fortunately it's not possible. In this case the Label "Start_Normal" would be placed at several locations. That's the reason of not placing the workaround in the macro STACK_INIT(). A possibility would be to place the workaround in each _c_init00 function with different labels as target address. But I drop further adaptions. Thank you guys ;)

    That's a good point. In case anyone else wants to do this I think it's still possible with local labels, like so:

    __asm("\t.newblock"); // Directive to start a new local label block (ensures $0 not already defined)
    __asm("\t BIT.B\t #0x08,&0x0001"); // if TXIE is set, errant call occurred
    __asm("\t JZ\t $0"); // if not start main program
    __asm("\t RETI"); // else return from interrupt call
    __asm("$0");
    __asm("\t.newblock"); // Directive to start a new local label block (undefines $0) 

**Attention** This is a public forum