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 Answer 1

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?

4
  • 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
    Commented Apr 21, 2016 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
    Commented Apr 21, 2016 at 13:11
  • requirement is about 100 Khz or more.
    – vivek
    Commented Apr 22, 2016 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
    Commented Apr 22, 2016 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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