...write an IRQ interrupt service routine in C?

Comments

3 comments

  • Avatar
    Vantassel

    Since these routines are specific to Rowley some example code would be very helpful here.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    Example code in CPU and board support packages.

    0
    Comment actions Permalink
  • Avatar
    Vantassel

    Thanks Paul, I'm on an ADuC7020, so I've been studying the code in Analog_ADuC7000.c.  So is it safe to say that my example is in ctl_start_timer?

     void
    ctl_start_timer(CTL_ISR_FN_t isr)
    {
      T0LD = TIMER_RECHARGE;
    #if __TARGET_PROCESSOR == ADuC7060 || __TARGET_PROCESSOR == ADuC7061
      T0CON = 0xC4 | (2 << T0CON_T0CLKSEL_BIT); /* 10.24MHz, Timer 0 enable, periodic, core clock / 16 */
    #else
      T0CON = 0xC4; /* Timer 0 enable, periodic, core clock / 16 */
    #endif
      userTimerISR = isr;
      ctl_set_isr(TIMER0_INT, 0, CTL_ISR_TRIGGER_FIXED, timerISR, 0);
      ctl_unmask_isr(TIMER0_INT);
    }


    0
    Comment actions Permalink

Please sign in to leave a comment.