Hi,

thanks for all answers. I found the problem to be the degauss coil from my CRT, inserting signals via the connected jtag cable (serial rs232 als was connected at the same time to same pc).

I couldn't figure out what state the msp went in, it sometimes just locked up. Also there was a another constant "rebooting" state. I guess that compares to what has been described before by other people, when using battery clips on the f149.

Everything runs fine now.

Greetz,

        Georg



Georg Ritter wrote:
Hello,

following the description of NMIs (chapter 2.2.1 in msp430x1xx userguide ) I want to implement an NMI handler.

I use:
interrupt (NMI_VECTOR)  INT_NMI(void) // 0xFFFC
{
    if ( (IFG1 & NMIIFG) != 0) // NMIIFG NMI
    {
        IFG1 &= ~NMIIFG;
        RS232printf( "NMIIFG\r\n");
    }
    else if ( (IFG1 & OFIFG) != 0) // OFIFG osc faul
    {
        IFG1 &= ~OFIFG;
        RS232printf( "osc failed\r\n");
    }
    else if ( (IFG1 & ACCVIFG) != 0) // ACCVIFG flash mem access violation
    {
        IFG1 &= ~ACCVIFG;
        RS232printf( "flash mem access violation\r\n");
    }
    else
    {
RS232printf( "don't know what caused this int in NMI \r\n IFG1=%u\r\n",(unsigned int)IFG1);
    }

    IE1 |= ( ACCVIE | NMIIE | OFIE | WDTIE );
}

the doc Note says (at the bottom of chapter 2.2.2):
Note: Enabling NMI Interrupts with ACCVIE, NMIIE, and OFIE The ACCVIE, NMIIE, and OFIE enable bits should not be set inside of an NMI interrupt service routine, unless they are set by the last instruction of the routine before the RETI instruction. Otherwise, nested NMI interrupts may occur, causing stack overflow and unpredictable operation.

At the moment it generates:
How could I accomplish that from within C? is it possible to get the
    ...
    bis.b    #llo(51), &0x0000
/* epilogue: frame size=0 */
    pop    r12
    pop    r13
    pop    r14
    pop    r15
    reti

The reason for beeing interested is, that my app seems to run for several hours and then the f149 reboots and I don't know why. Stack probably but how would I attack that and why could the stack overflow from a C program (no dyn. mem allocation). Nested ints perhaps?

greetings,

    Georg


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users




Reply via email to