This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fx2 interrupt int0

Hello,

I want to work with the interrupt int0 of the FX2.

The regsiters I have to use are written down in the TRM of the FX2. But where are informations about enabling the interrupt or name of the ISR for example?

Where I can search? I only find information snippets.

Best regards
Jan

Parents
  • the only way you can communicate between a function and an ISR is having them in the same module or using a global variable

    Yes, but how can I realize it making it global when I use two files which have to access this variable?

    could I make it as follows:
    creating a new file
    _______________________
    globalVars.h:

    static volatile char var;

    static char getVar()
    { return var;
    }

    static incVar()
    { var++;
    }

    ________________________

    Whenn accessing the variable from the ISR or main file I call the getVar()
    fucntion. Does this realization create two variables internaly too?

Reply
  • the only way you can communicate between a function and an ISR is having them in the same module or using a global variable

    Yes, but how can I realize it making it global when I use two files which have to access this variable?

    could I make it as follows:
    creating a new file
    _______________________
    globalVars.h:

    static volatile char var;

    static char getVar()
    { return var;
    }

    static incVar()
    { var++;
    }

    ________________________

    Whenn accessing the variable from the ISR or main file I call the getVar()
    fucntion. Does this realization create two variables internaly too?

Children