2

I'm looking at the BCM2835 datasheet https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf. On page 89, there is a block diagram for the GPIO module, as attached below. It is clear that there are three interrupt lines going out of the module.

GPIO Block Diagram

However, the interrupt table, specified on page 113, shows there are four GPIO interrupt lines going into the interrupt controller.

Part of the Interrupt Table

Can anyone help me understand what's happening here? Why is there an extra input on the IC? Any hint or pointer will be appreciated.

2 Answers 2

2

The BCM2835 datasheet that you referenced was written for the first generation Raspberry Pi, in which there were only 2 banks of GPIO pins.

On the BCM2837 (the SoC used in the Raspberry Pi 3), there are actually 3 banks of GPIO pins, so there are four interrupt lines going from the GPIO controller to the interrupt controller.

  • gpio_int[0] for BANK0 (pins 0-27)
  • gpio_int[1] for BANK1 (pins 28-45)
  • gpio_int[2] for BANK2 (pins 46-53)
  • gpio_int[3] for all the pins

You can verify this with the "raspi-gpio get" command, which lists each pin's function (INPUT/OUTPUT/ALT). If you filter the results with grep, you should see:

raspi-gpio get | grep BANK

BANK0 (GPIO 0 to 27):
BANK1 (GPIO 28 to 45):
BANK2 (GPIO 46 to 53):

Even though the GPIO controller in the original BCM2835 only had 2 banks, Broadcom was forward–looking and reserved a bit in each register of the interrupt controller for future versions, the gpio controller of which would have an additional bank.

1

The paragraph introducing that table (pg. 112) reads:

The following is a table which lists all interrupts which can come from the peripherals which can be handled by the ARM.

The diagram on page 89 and the description which follow do make it explicit only three interrupt lines are used.

This does not seem like any kind of contradiction or inconsistency to me, anymore than having 4 phone jacks in my apartment but only 3 phones would be considered inconsistent. Having 5 phones might be a problem.

0

Your Answer

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

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