Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

External Interrupt in Microblaze

Status
Not open for further replies.

eewonder

Newbie level 5
Joined
Jan 15, 2003
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
49
microblaze timer interrupt

I need a example code for External Interrupt in Microblaze. Could someone help me about this?
In a main program, how to declare and setup the external interrupt
In handler function, how to detect an external interrupt when it happen, and how to clear it?

Thanks in advance
 

Hi
which edk version u r using?there is difference betn interrupt handling of EDK 8.2 and 9.1...let me know.
 

I figure out the solution

Thanks
 

You must register the interrupt. I used EDK9.1 I think.

This might be of use:

Code:
void InterruptHandler(void);

int main(void)
  {
  microblaze_register_handler((XInterruptHandler)InterruptHandler, (void*)0);
  
  #ifdef DEBUG
  print("* Registered Interrupt Handler *\n\r");
  #endif

  microblaze_enable_interrupts();

  // Something useful here.

  return 0;
  }



void InterruptHandler(void)
  {
  #ifdef DEBUG
  print("* Entering Interrupt *\r\n");
  #endif
  microblaze_disable_interrupts();

  // Do something useful here :).
 
  microblaze_enable_interrupts();

  #ifdef DEBUG
  print("* Leaving Interrupt *\r\n");
  #endif
  }
 

I want to start learning microblaze . can any body guide me what to read and where to get them ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top