Timeline for Why are some GPIO pins HIGH when the Raspberry Pi boots up?
Current License: CC BY-SA 3.0
28 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 31, 2017 at 17:58 | answer | added | Sathaye.h | timeline score: 2 | |
| Oct 11, 2015 at 7:29 | history | edited | Peter Mortensen | CC BY-SA 3.0 | Copy edited. |
| Jul 13, 2015 at 10:44 | history | tweeted | twitter.com/#!/StackRaspi/status/620544362024468480 | ||
| Jun 18, 2015 at 16:40 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 16:39 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 16:40 | |||||
| Jun 18, 2015 at 16:36 | comment | added | Viktor Raspberry | Another thing I can do is set a python program to run at boot, and that program will set all the GPIO's which are HIGH to LOW. | |
| Jun 18, 2015 at 16:35 | comment | added | Viktor Raspberry | Ok I get it now, its unfortunate that I can't change the state of the pins which are naturally set to HIGH, but that's the way it is. | |
| Jun 18, 2015 at 16:31 | comment | added | goldilocks | To re-iterate my other point, if you are sure there's really 3.3 V there great, but note an LED connected to an input pin on low at boot will light up, just not as strongly as it would with the pin on output set high. This does not indicate 3.3V of power. It is because the input floats and there may be 1-2 V there. | |
| Jun 18, 2015 at 16:28 | comment | added | goldilocks | You CANNOT change the default state at power on, That's carved into the hardware. So if you absolutely cannot have this pin high, you need a different pin, or as joan suggests additional hardware. If it is on immediately when you apply the power, that's the issue, which is odd since the spec says GPIO 18 is low. If it is the OS, you can change that. Also, you can use the OS to set it at boot, if you are okay with the few seconds that will take. This is why you need to determine the difference, and what /sys says at boot. | |
| Jun 18, 2015 at 16:24 | comment | added | Viktor Raspberry | Regarding your question, wheter or not the LED turns on right after the power is on. The answer is not, the raspberry pi boots up, those texts and lines come up, where everything loads, and after like 5 to 10 seconds the LED's turn on. | |
| Jun 18, 2015 at 16:21 | comment | added | Viktor Raspberry | I looked at Joan's PDF, and I analyzed the states of the GPIO's, and I am not sure how to set and configure those pins which are naturally set to HIGH, to LOW, and to save those settings, I am very new to raspberry pi, and I dont know much, so sorry that I am not understanding very well. | |
| Jun 18, 2015 at 16:20 | comment | added | goldilocks | Out of curiousity, does this LED turn on immediately when you plug in the power, then stay on, or does it only come on after a few seconds? I'm not sure if there is enough time to notice a difference between the power on state and any state that might be set by the kernel when in loads, but there might be. That would be the delay between the red PWR LED built into the board and your LED on pin 18. | |
| Jun 18, 2015 at 16:15 | comment | added | goldilocks | Just to clarify, setting that stuff in /sys doesn't persist across boot. Those aren't real files. They're in memory conduits to the kernel (when you read one, you're asking for information, when you write to one, you're sending the kernel a setting), which is why they all have a size of 0, etc. | |
| Jun 18, 2015 at 16:10 | comment | added | goldilocks | No, as various people have pointed out, the pins have a default state at boot. As per the Broadcom pdf in joan's answer though, that pin should be low at boot, although the OS may change that -- which is why I said you should use the OS /sys interface to check the settings, not to play with them. If they confirm it's set high before you change anything, then the physical state is consistent with the OS, and (if you want) you can investige the device tree angle. Note doing the export may change the state -- obviously you will notice with the LED -- I'm not sure of the rules there. | |
| Jun 18, 2015 at 16:04 | comment | added | Viktor Raspberry | Thank You for the link. I did all the steps that the tutorial showed, and the LED's turned off, then I did "sudo reboot", and when it rebooted, the same LED's turned on again at boot. I am guessing that the settings are not being saved or something. | |
| Jun 18, 2015 at 15:58 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 16:39 | |||||
| Jun 18, 2015 at 15:58 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 15:58 | |||||
| Jun 18, 2015 at 15:58 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 15:58 | |||||
| Jun 18, 2015 at 15:50 | comment | added | goldilocks | There are oodles of explanations of that, so I won't bother to regurgitate. That example is kind of heavy on the echo, which writes, i.e., sets something. After you export it you want to refrain from that and just use cat, which reads, to check the direction and the value. | |
| Jun 18, 2015 at 15:44 | vote | accept | Viktor Raspberry | ||
| Jun 18, 2015 at 15:44 | |||||
| Jun 18, 2015 at 15:43 | comment | added | Viktor Raspberry | When I write "/sys/class/gpio" , it says "-bash: /sys/class/gpio: Is a directory". I am not sure how to export a specific pin. | |
| Jun 18, 2015 at 14:05 | comment | added | goldilocks | So if you go into /sys/class/gpio and export pin 18, what state does the system then say it is in if you change nothing? | |
| Jun 18, 2015 at 12:07 | comment | added | Viktor Raspberry | There is 3.3 volts applied to it. | |
| Jun 18, 2015 at 8:19 | comment | added | goldilocks | Is that LED on as brightly as it would be when you set it high, or is it just glowing dimly? | |
| Jun 18, 2015 at 4:18 | answer | added | joan | timeline score: 30 | |
| Jun 18, 2015 at 3:26 | answer | added | hildred | timeline score: 12 | |
| Jun 17, 2015 at 23:21 | review | First posts | |||
| Jun 18, 2015 at 3:13 | |||||
| Jun 17, 2015 at 23:19 | history | asked | Viktor Raspberry | CC BY-SA 3.0 |