2010-04-26 15:30:46     Want good uClinux/Xenomai interrupt example

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-04-26 15:30:46     Want good uClinux/Xenomai interrupt example

Bryan Hilterbrand (UNITED STATES)

Message: 88914   

 

The hardware I'm working with has an external (hardware) interrupt coming in on port G bit 8. I've written driver code that (theoretically) turns the interrupt on, and then I use the rt_intr_create and rt_intr_wait to create and service the interrupt. The rt_intr_wait never returns. Hmmm...

 

I thought I'd try to look at a good example before I post a bunch of code here for people to wade through - does anyone have any good example of how to do this? Pointers to documentation might be helpful as well.

 

Thank you!

 

Bryan

QuoteReplyEditDelete

 

 

2010-04-26 15:48:36     Re: Want good uClinux/Xenomai interrupt example

Bryan Hilterbrand (UNITED STATES)

Message: 88915   

 

One further question - is there anything I need to enable in my uClinux build for external interrupts to work?

QuoteReplyEditDelete

 

 

2010-04-26 16:08:34     Re: Want good uClinux/Xenomai interrupt example

Mike Frysinger (UNITED STATES)

Message: 88916   

 

the only xenomai docs we have are here:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:adeos

 

otherwise, all the xenomai docs are upstream

QuoteReplyEditDelete

 

 

2010-04-26 23:56:11     Re: Want good uClinux/Xenomai interrupt example

Yi Li (CHINA)

Message: 88923   

 

Bryan,

 

The only example I can find using the xenomai native IRQ management API is: xenomai/ksrc/skins/native/snippets/user_irq.c.

 

And the document included in xenomai explains the APIs in details - however, I did not tested on Blackfin. Also, please make sure the Blackfin irq control register is set correctly by these APIs.

 

-Yi

QuoteReplyEditDelete

 

 

2010-04-27 12:40:27     Re: Want good uClinux/Xenomai interrupt example

Bryan Hilterbrand (UNITED STATES)

Message: 88968   

 

Thanks Mike and Yi. I've got the basic framework in place that is quite similar to the example that Yi pointed me to. I was hoping for some tips on how to set the Blackfin registers to enable the interrupt, but I haven't been able to find anything.

 

Does anyone have any examples of setting these registers?

QuoteReplyEditDelete

 

 

2010-04-27 13:04:19     Re: Want good uClinux/Xenomai interrupt example

Mike Frysinger (UNITED STATES)

Message: 88969   

 

we dont document the hardware SIC/CEC interface because under Linux you're not supposed to touch the registers.  Linux provides APIs for doing these things.

QuoteReplyEditDelete

 

 

2010-04-27 23:02:08     Re: Want good uClinux/Xenomai interrupt example

Yi Li (CHINA)

Message: 88973   

 

Bryan,

 

As Mike said, you don't need to program the Blackfin IRQ register directly - what I mean is, the xenomai IRQ management API will set the blackfin registers - you can check (e.g, using JTAG) whether the setting is correct if there is problem.

 

-Yi

Attachments

    Outcomes