This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: interrupt handling


Abhilash,

I am interested to know which version of the mcore GNU tools you are using.  I am now working on building a gcc-3.0.2 cross-compiler for mcore-elf running on Cygwin/Win2K.

I'll try to answer your question here, but a better forum for hardware related questions can be found on Motorola's web site here:

http://e-www.motorola.com/support/index.html

Click on the Tech Support tab and follow the menus to get an account set up.  You'll need 128-bit encryption on your browser to make it work.  This will forward your enquiry to Motorola's global tech support helpline, where there are lots of people who will be happy to answer your questions.

The interrupt handling features on MMC2107 provide a lot of flexibility, but it's more complicated to set up the hardware because of all the options you have available to you.  I don't know where your problem has occurred, so I'll review the whole process.  For an edge port interrupt, you'll need to do several things.

1) Initialize the edge port module: 
   a) EPPAR (pin assignment reg) chooses level or edge-sensitivity
   b) EPDDR (data direction reg) chooses the pins you want to use
   c) EPIER (interrupt enable reg) enables interrupts on those pins

2) Initialize the interrupt controller module:
   a) ICR (interrupt control reg) chooses vectored or autovectored
   b) PLSR36 (priority level select reg) chooses priority for the 
      active interrupt source - EPF4 is interrupt source #36
   c) FIER (fast interrupt enable reg) enables the priority int you
      have selected. If priority = 5, then set the FIER[FIE5]bit.

3) Enable interrupt handling in the core
   a) PSR[FE] enables fast exceptions
   b) PSR[EE] enables exception shadowing

You will need to be sure that vector table contains the address of your EPF4 service routine.  This entry will be at an offset of (32 + 5) * 4 bytes from the start of the table, assuming again that you have selected priority 5 for the edge port 4 source, and you are using vectored interrupts.

If you're trying to wake the part up from stop mode using an edge port interrupt, you will have to use level-sensitivity on the pins because edge-sensitivity requires an active clock.

I hope this helps.

Best regards,

Brian LaPonsey
32-Bit Embedded Controller Division
Motorola Semiconductor Products Sector

-----Original Message-----
From: Abhilash R [mailto:rabhilash@tataelxsi.co.in]
Sent: 18 December 2001 09:50
To: crossgcc@sources.redhat.com; gcc-help@gcc.gnu.org
Subject: interrupt handling


Hello,
We are using GNU C compiler in one of our project. The microcontroller
on our target board is MMC2107.  However we are facing some problem
during interrupt handling.
In my code I have defined an interrupt as fast interrupt coming on egde
port EP.4. I have done all the initialisations properly & simulated that

interrupt using Interrupt force register of MMC2107. Reading back the
status register shows that interrupt is valid & there is an interrupt
pending for execution. However the branching to ISR is not happening.

Kindly let us know the solution for this problem as soon as possible.

regards
abhilash


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]