bluestar
Posts: 5
Joined: Sat Jun 01, 2013 9:27 pm

Raspberry Pi v2 – function of pin P1-12 at power-up.

Sun Jun 09, 2013 12:30 am

1. Are all pins set to Alternate Function Mode 0 when the board powers-up?

2. If question 1 is true, then what function is set on header P1, pin 12? BCM2865 ARM Peripherals.pdf Table 6-31 indicates pin 12 in alt-0 mode would have a PW-M0 function. While, the Raspberry Pi Revision 2 schematics show GPIO18 coming out of IO1 is labeled GPIO_Gen1 (sheet 2 of 5) and it is directly wired to header P1 pin 12 and that pad is also labeled GPIO_Gen1 (also sheet 2 of 5). So I am confused as to which is correct.

3. The other possibility is that all pins default to GPIO mode when the board powers-up and to attain the special functions like, UART, I2C and SPI then each respective pin must be set to its respective alternate function mode.

ChristophS
Posts: 2
Joined: Tue Jan 13, 2015 10:06 pm

Re: Raspberry Pi v2 – function of pin P1-12 at power-up.

Fri Jan 16, 2015 8:07 pm

Hello,
I Buyed a Raspberry B+ and installed WebIOPi a webinterface for controlling the GPIO. and install wiringpi. WiringPi brings the commandline-tool gpio. if you call

Code: Select all

 gpio readall
you see your configuration of gpio. Mine after a reboot is:
the most GPIO Pins are in Input-mode, except PIN 8 and 10 are in Mode ALT0 for UART RX0/TX0. but you can alter pin8 and 10 to in or output if you want to use them as an GPIO-Pin with

Code: Select all

 gpio mode -1(for pysical mode) 8 OUTPUT|INPUT 
or

Code: Select all

 gpio mode -1 10 OUT|IN 
to reset to normal mode

Code: Select all

 gpio mode -1 8 ALT0  # for UART Mode 
If you load via

Code: Select all

i2c-load
or sudo modprobe

Code: Select all

 i2c-bcm2708
the i2c-bcm2708 kernel-module, the pins 3 and 5 automatically turned to ALT0 to sda.1 and scl.1 for i2c-input

I hope that will help you a litte bit.
CSchultz

bluestar
Posts: 5
Joined: Sat Jun 01, 2013 9:27 pm

Re: Raspberry Pi v2 – function of pin P1-12 at power-up.

Fri Jan 16, 2015 9:00 pm

Great Info.
Thanks.

Return to “Interfacing (DSI, CSI, I2C, etc.)”