[uClinux-dev] coldfire interupts

Giridhara B giridharab at myw.ltindia.com
Tue Feb 4 22:34:07 EST 2003


Hi eric,

please see the IRQ table for MCF5272C3,                

     MCF5272 Interrupt Vector Table

Vector     Number     Bits 4-0     Source Function

--------------------------------------------------------------------------------


64            00000     Reserved     User Spurious Interrupt

--------------------------------------------------------------------------------
65            00001     INT1           External Interrupt Input 1

--------------------------------------------------------------------------------
66             00010     INT2           External Interrupt Input 2

--------------------------------------------------------------------------------
67             00011     INT3            External Interrupt Input 3

--------------------------------------------------------------------------------
68             00100     INT4             External Interrupt Input 4

--------------------------------------------------------------------------------
69             00101      TMR1         Timer 1

--------------------------------------------------------------------------------
70             00110     TMR2         Timer 2

--------------------------------------------------------------------------------
71             00111     TMR3         Timer 3

--------------------------------------------------------------------------------
72             01000     TMR4         Timer 4

--------------------------------------------------------------------------------
73             01001     UART1         UART 1

--------------------------------------------------------------------------------
74             01010      UART2         UART 2

--------------------------------------------------------------------------------
75             01011     PLIP             PLIC 2KHz Periodic

--------------------------------------------------------------------------------


hope helps,
giri


  ----- Original Message ----- 
  From: Eric Steimle 
  To: uclinux-dev at uclinux.org 
  Sent: Tuesday, February 04, 2003 8:20 PM
  Subject: RE: [uClinux-dev] coldfire interupts


  Thank you giri, can you tell me how you determine which uClinux number corresponds to which actual interrupt number.  Such as interrupt line 1 on the coldfire = 65 and so on?

   

  Thank you

   

  Eric

   

  -----Original Message-----
  From: uclinux-dev-admin at uclinux.org [mailto:uclinux-dev-admin at uclinux.org] On Behalf Of Giridhara B
  Sent: Monday, February 03, 2003 10:17 PM
  To: uclinux-dev at uclinux.org
  Subject: Re: [uClinux-dev] coldfire interupts

   

  Hi eric,

   

   

  The interrupt initialization and usage is as follows,

   

  1> in init_module:

   

       //Request the IRQ and assign a handler to execute, when an interrupt generated.
       req_irq = request_irq(65,test_interrupt,SA_INTERRUPT,"test int",NULL);

      // configure the interrupt control register to set Pending interrupts and priority level as 5 

       icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
        *icrp = (*icrp & 0x07777777) | 0xd0000000;
      

      ( if you want , you can configure triggering on external interrupt input as high-to-low or low-to-high transition by setting PITR register (by default low-to-high - positive  edge triggering))

   

   

  This will generate interrupt, you can see interrupt registry in cat /proc/interrupts.

   

  2>. Once interrupt generated, it will call the test_interrupt handler,

   

      in the handler,

   

  If the INT1 is used as external interrupt, you have to toggle INT1 line and clear the PI bit in ICR1 as follows,

   

       icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
        *icrp = (*icrp & 0x07777777) | 0xd0000000;

   

  hope helps,

  giri

   

   

   

   

    ----- Original Message ----- 

    From: Eric Steimle 

    To: uclinux-dev at uclinux.org 

    Sent: Monday, February 03, 2003 8:08 PM

    Subject: RE: [uClinux-dev] coldfire interupts

     

    I plan on using external int 1.

     

    -----Original Message-----
    From: uclinux-dev-admin at uclinux.org [mailto:uclinux-dev-admin at uclinux.org] On Behalf Of Giridhara B
    Sent: Saturday, February 01, 2003 1:26 AM
    To: uclinux-dev at uclinux.org
    Subject: Re: [uClinux-dev] coldfire interupts

     

    Hi,

     

    may i know, which interrupt you are planning to use ? i mean external (INT1-INT2.etc) or Timer interrupts.

     

     

    giri

      ----- Original Message ----- 

      From: Eric Steimle 

      To: uclinux-dev at uclinux.org 

      Sent: Saturday, February 01, 2003 2:35 AM

      Subject: [uClinux-dev] coldfire interupts

       

      Does anyone have any advice on how to request an interrupt and set a handler for a driver in uClinux.  I don't really understand how it works yet.  I'm still trying to get my usb host chip to play nice with uClinux but nothing yet.

       

      Thanks

      Eric

       

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20030205/28a32f7d/attachment.html>


More information about the uClinux-dev mailing list