Hardware Reference
In-Depth Information
43 exit(1);
44 }
45
46 close(mem_fd);
47 pads = (volatile unsigned
)pads_map;
48 }
49
50 int
51 main(int argc,char
argv) {
∗∗
52 int x;
53 union {
54 struct {
55 unsigned drive : 3;
56 unsigned hyst : 1;
57 unsigned slew : 1;
58 unsigned reserved : 13;
59 unsigned passwrd : 8;
60 } s;
61 unsigned w;
62 } word;
63
64 initialize();
65
66 for ( x=PADS_GPIO_00_27; x<=PADS_GPIO_46_53; x += 4 ) {
67 word.w = GETPAD32(x) ;
68 printf("%08X : %08X %x %x %x\n" ,
69 x+0x7E10000, word.w,
70 word.s.slew, word.s. hyst, word.s.drive) ;
71 }
72
73 return 0;
74 }
75
76 /
End
/
GPIO Current Budget
Gert van Loo states that “the Raspberry-Pi 3V3 supply was designed with a maximum
current of ~3 mA per GPIO pin.” 29 He correctly concludes that if “you load each pin with
16 mA, the total current is 272 mA.”
From this, we can calculate the designed current budget for GPIO pins:
Gert is referring to 17 GPIO pins ( 272
16
mA
mA =
1.
)
17
2.
The Pi is designed for 17 × 3 mA = 51 mA
This is consistent with the 50 mA capacity figure we arrived at in Chapter 2. This is
the remaining current capacity available from pins P1-01, P1-17, and P5-02.
 
Search WWH ::




Custom Search