3

I am learning assembly language programming in Raspberry Pi 2 model B. I know about Code::Blocks and gdb. Using assembly language the processor's register can be controlled, but I want to control the peripheral's registers (BCM2835 peripheral) because I need to control interrupts.

Can any one suggest, is it possible?

1

I expect your terminology is incorrect.

If you want to control interrupts you will either have to go bare metal or write a Linux kernel driver.

If you use Raspbian from userland you can not "control" interrupts. However you can request a callback when an interrupt happens.

Do you want to use interrupts to control peripherals? To do what?

  • By userland , event can be detected in a GPIO but that is very slow for my application thats why I am trying to do it with real interrupt . When I looked at BCM 2835 data sheet in page 109, it give information about interrupts and in page no. 112 itmentions about Registers. So I think that to controlinterrupt , these register field should be set.t – vivek Apr 21 '16 at 12:58
  • 1
    It might be worth adding that information to your question. It may be useful. What sort of interrupt rates are you talking about? How often and how frequent? – joan Apr 21 '16 at 13:11
  • requirement is about 100 Khz or more. – vivek Apr 22 '16 at 5:22
  • @vivek Okay. You won't be able to use interrupts for that from userland. There is a latency of about 50 µs between interrupt and userland process notification. You will lose interrupts. I suggest you have a look at my pigpio library which will capture the events down to the microsecond level. However unless you have very little processing to do do I can't see those data rates being handled for more than a few seconds or so. – joan Apr 22 '16 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.