树莓派4B GPIO_NUM对应地址
时间: 2023-10-11 21:11:25 浏览: 95
树莓派4B的GPIO_NUM对应地址如下:
| GPIO_NUM | BCM GPIO | Physical Pin | Address (BCM2835) |
| -------- | -------- | ------------ | ----------------- |
| 2 | GPIO 2 | Pin 3 | 0x7e215008 |
| 3 | GPIO 3 | Pin 5 | 0x7e21500c |
| 4 | GPIO 4 | Pin 7 | 0x7e215010 |
| 5 | GPIO 5 | Pin 29 | 0x7e215014 |
| 6 | GPIO 6 | Pin 31 | 0x7e215018 |
| 7 | GPIO 7 | Pin 26 | 0x7e21501c |
| 8 | GPIO 8 | Pin 24 | 0x7e215020 |
| 9 | GPIO 9 | Pin 21 | 0x7e215024 |
| 10 | GPIO 10 | Pin 19 | 0x7e215028 |
| 11 | GPIO 11 | Pin 23 | 0x7e21502c |
| 12 | GPIO 12 | Pin 32 | 0x7e215030 |
| 13 | GPIO 13 | Pin 33 | 0x7e215034 |
| 14 | GPIO 14 | Pin 8 | 0x7e215038 |
| 15 | GPIO 15 | Pin 10 | 0x7e21503c |
| 16 | GPIO 16 | Pin 36 | 0x7e215040 |
| 17 | GPIO 17 | Pin 11 | 0x7e215044 |
| 18 | GPIO 18 | Pin 12 | 0x7e215048 |
| 19 | GPIO 19 | Pin 35 | 0x7e21504c |
| 20 | GPIO 20 | Pin 38 | 0x7e215050 |
| 21 | GPIO 21 | Pin 40 | 0x7e215054 |
| 22 | GPIO 22 | Pin 15 | 0x7e215058 |
| 23 | GPIO 23 | Pin 16 | 0x7e21505c |
| 24 | GPIO 24 | Pin 18 | 0x7e215060 |
| 25 | GPIO 25 | Pin 22 | 0x7e215064 |
| 26 | GPIO 26 | Pin 37 | 0x7e215068 |
| 27 | GPIO 27 | Pin 13 | 0x7e21506c |
| 28 | GPIO 28 | Pin 27 | 0x7e215070 |
| 29 | GPIO 29 | Pin 28 | 0x7e215074 |
| 30 | GPIO 30 | Pin 3 | 0x7e215078 |
| 31 | GPIO 31 | Pin 5 | 0x7e21507c |
其中,BCM GPIO是BCM2835芯片上GPIO的编号,Physical Pin是树莓派4B上引脚的物理编号。地址是BCM2835芯片中GPIO寄存器的地址,可以通过访问这些地址来控制树莓派4B的GPIO。
阅读全文