Skip to main content
Visitor II
September 19, 2007
Question

Problem on Interrupt (VIC0 and VIC1)

  • September 19, 2007
  • 11 replies
  • 3358 views
Posted on September 19, 2007 at 07:53

Problem on Interrupt (VIC0 and VIC1)

    This topic has been closed for replies.

    11 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:33

    Hello,

    My interrupts:

     

    VIC0_VA4R = (u32)TIM0_IRQHandler; // for dma

     

    VIC0_VA6R = (u32)TIM2_IRQHandler; // 2ms timer

     

    VIC0_VA12R = (u32)DMA_IRQHandler;

     

    VIC1_VA2R = (u32)UART2_IRQHandler;

     

    VIC1_VA3R = (u32)I2C_IRQHandler;

     

    VIC1_VA13R = (u32)EXT_IO_IRQHandler;

     

    For testing I continiously read and write to an external EEPROM. After a certain time the processor resets. After the help on this forum, i modified my code with 2 default IRQ functions: (as suggested by JAL)

     

    void Default0_IRQHandler( void ) __attribute ((interrupt(''IRQ'')));

     

    void Default0_IRQHandler( void ){

     

    spuriousInterruptCount0++;

     

    VIC0_VAR = 0;

     

    }

     

     

    void Default1_IRQHandler( void ) __attribute ((interrupt(''IRQ'')));

     

    void Default1_IRQHandler( void ){

     

    spuriousInterruptCount1++;

     

    VIC1_VAR = 0;

     

    }

     

     

    VIC0_DVAR = (u32)Default0_IRQHandler;

     

    VIC1_DVAR = (u32)Default1_IRQHandler;

     

    After a certain time, Default1_IRQHandler is entered and spuriousInterruptCount1 is incremented. After returning, the continious read/write to I2C didn't continue...

    Then I modified the 2 default IRQ functions:

     

    void Default0_IRQHandler( void ){

     

    spuriousInterruptCount0++;

     

     

    VIC0_VAR = 0;

     

    VIC1_VAR = 0;

     

     

    }

     

    void Default1_IRQHandler( void ){

     

    spuriousInterruptCount1++;

     

     

    VIC0_VAR = 0;

     

    VIC1_VAR = 0;

     

     

    }

    And up till now, it keeps on working!!!

    Read/write tests to the EEPROM: 4120

    spuriousInterruptCount1: 81

    spuriousInterruptCount0: 0

    I hope this solution is suitable for devellopers with simular problems.

    Best Regards,

    Louis XIV