Skip to main content
Visitor II
December 20, 2005
Question

Need help with interrupts

  • December 20, 2005
  • 4 replies
  • 880 views
Posted on December 20, 2005 at 13:25

Need help with interrupts

    This topic has been closed for replies.

    4 replies

    sabrecatAuthor
    Visitor II
    December 18, 2005
    Posted on December 18, 2005 at 18:08

    I'm trying to use a ST72321 MCU for a school project. The programming seems to OK, I can compile the program and run it in the STVD7 simulator.

    But when I try to run it using my inDART programmer I can't get the interrupts to work. As far as I can see all flags are set and never cleared?

    The specific interrupt function is a timer using the main clock:

    In MAIN:

    MCCSR = 0x0E; (longest timebase, interrupt on)

    temp = MCCSR; (to clear OIF)

    _asm(''rim'');

    Call at interrupt vector address 0xFFF8

    @interrupt void timerinterrupt (void)

    {

    temp = MCCSR;

    time++;

    }

    Have I missed a register setting, or is it my hardware that is acting up?

    Visitor II
    December 20, 2005
    Posted on December 20, 2005 at 06:14

    Hi,

    It seems to me you did the right things !

    Are you 100% sure that the problem is in the interrupt management ?

    Do you know if the first interrupt occurs ?

    Did you check the basic functionnalities of the CPU ? (clock)

    Can you try to set an output depending what part of your code you are executing ?

    BR

    laurent

    sabrecatAuthor
    Visitor II
    December 20, 2005
    Posted on December 20, 2005 at 11:39

    I have checked functionallity both by using I/O ports connected to LEDs and by the more basic procedure of using breakpoints when running it through STVD7. I seem not to get any interrupts at all.

    I wonder if it's SofTech's system that is acting up. I've gotten some really strange programming errors.

    Visitor II
    December 20, 2005
    Posted on December 20, 2005 at 13:25

    Hi,

    Then you can try to contact directly Softec :

    mailto:support@softecmicro.com

    I hope they can help you.

    Best regards

    Laurent