Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Interrupt handler software example

Altera_Forum
Honored Contributor II
1,075 Views

Hi 

I'm trying to write a bare metal usb midi device driver using the 13.0 hardwarelib and i'm stuck tryimg to use the alt_int_isr_register() function for creating an interrupt handler. 

Searching the internet for further documentation and interrupt examples of the Socal hardwarelib and api, give so far no results (maybe because its relatively new). 

---- 

Is there more nios style documentation (underway) like the chapter 8 exception handling chapter of the NIiosII Software Developers Handbook, containing code examples ? 

--- 

and/or Can someone show some code as how to setup an bare metal interupt handler using ds5 and the gnu bare metal compiler ?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
139 Views

Hi, 

 

The 13.0 SP1 contains an updated HWLIB and some more examples. 

There you can find a baremetal example using the HWLIB and interrupts. 

The example is called "Altera-SoCFPGA-HardwareLib-16550-GNU". Have a look at the example and if there are any question, just ask. 

 

The default-location for the example is here: 

"C:\altera\13.0sp1\embedded\examples\software

 

best regards!
Altera_Forum
Honored Contributor II
139 Views

Thanks for the good advice 

I was actually using the sp1 version, but had discarted the 16550 example due to having broken the usbuart connector on my sockit board... 

I have now mananged to implement a button interrupt handler from looking at the example :-) , but getting a usb device reset interrupt to work 

is still eluding me.  

best wishes
Reply