0

I've read that Raspberry GPIO ports can't withstand +5v and works only with +3.3 v, and that +5v could potentially permanently damage the port? But what does it mean exactly? Is that specific channel broken meaning that it can't be used reliably neither as an INPUT nor as an OUTPUT, it works as an output but it doesn't work and input?

6
  • This might help: raspberrypi.stackexchange.com/questions/97949/….
    – tlfong01
    Sep 12, 2020 at 9:22
  • This might also help: raspberrypi.stackexchange.com/questions/96560/….
    – tlfong01
    Sep 12, 2020 at 9:25
  • 1
    I accidentally did it but my rasp seem to be working fine. Is there a way to check if the GPIO pins have been somehow damaged, for example if they read an incorrect input value? Sep 12, 2020 at 9:39
  • 1
    You are a prisoner of a mindset I urge you to drop. There is no such thing as an 'exact' answer to your question. Electronics is specified to work at certain conditions. When those conditions are not met, everything can happen. If we want to take it ELI5, your question has the same meaning of "can I still go on with my car if I drive into a wall at 50 ?", you can find a lot of people claiming they got away with it but in the end nobody cares: don't do it.
    – MaxDZ8
    Sep 12, 2020 at 9:59
  • 1
    You have not one, but two correct answers to your question. Select one, please. I've never made this comment to anyone, but I will make it here. This is "laws of physics" stuff, and it is immutable.
    – Seamus
    Sep 13, 2020 at 0:12

4 Answers 4

3

Applying 5V to a Pi GPIO will destroy the GPIO and the Pi (the Pi may not die immediately, it might take days to cascade the failure through the silicon).

There is a caveat, the Pi/GPIO may survive if the current is very limited, perhaps a few microamps.

2

The actual answer is it depends.

If you specify in more detail exactly what you intend to connect we can give you a better estimate of the probability that you will destroy the Pi or GPIO, but no one can give a definite answer because this puts the SOC into an indeterminate state. This can cause catastrophic chip failure, a simple GPIO failure, a latch up failure mode which is recoverable on removing power or if current is limited (which effectively prevents the actual voltage exceeding 3.3V + ~0.7V) no impact.

The simple answer is DON'T DO IT

0

The question is how much current did you put into the Pi. It is not the voltage but the current that destroys the port. You so need voltage in respect to the port pin to push current. The more capacitance on the source the more the current will be available. This is the reason many put resistors in series with the inputs. The input protection diodes are good for about 20 mA max, below that it should be OK assuming the fault did not push VCC out of limits. When you "zap" it catastrophic damage can occur and it will fail immediately. If it not catastrophic it may be milliseconds, maybe years that time cannot be determined but you can be sure it will eventually fail. If it appears to work the extent of the damage cannot be determined by sight but it needs to be done by decapping the package and checking the die with the eye and magnification including an electron microscope.

0

I just did this mistake on my Raspberry Pi B and it corrupted my system so it no longer boots. Using a fresh system image boots so no critical hardware damage from this incident.

This is how it went on the terminal:

pi@rpi1:/sys/class/gpio $ echo 14 > export
pi@rpi1:/sys/class/gpio $ cd gpio14
pi@rpi1:/sys/class/gpio/gpio14 $ echo in > direction
pi@rpi1:/sys/class/gpio/gpio14 $ cat value
0
pi@rpi1:/sys/class/gpio/gpio14 $ watch -n 0.1 cat value
pi@rpi1:/sys/class/gpio/gpio14 $ dmesg
[  303.329568] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  303.392759] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  303.512333] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
--truncated--
[  304.636334] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  304.823833] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  304.882988] sysrq: Changing Loglevel
[  304.890147] sysrq: Loglevel set to 8
[  304.897301] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  304.956365] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  305.015431] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
--truncated--
[  306.454802] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  306.543298] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  306.631793] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  306.720289] sysrq: Changing Loglevel
[  306.731003] sysrq: Loglevel set to 0
[  306.741715] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  306.830211] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[  306.918702] sysrq: Show Regs
[  306.927332] CPU: 0 PID: 285 Comm: hass Tainted: G         C        5.15.32+ #1538
[  306.927361] Hardware name: BCM2835
[  306.927373] PC is at 0xb1fe4
[  306.927400] LR is at 0x47ec94
[  306.927414] pc : [<000b1fe4>]    lr : [<0047ec94>]    psr: a0000010
[  306.927430] sp : bec0f3e0  ip : 016fea08  fp : eb604631
[  306.927449] r10: eb604631  r9 : 0000002c  r8 : b6841070
[  306.927463] r7 : 00000011  r6 : 0007cf1c  r5 : 000b1c10  r4 : 016fea08
[  306.927478] r3 : 0049becc  r2 : eb604631  r1 : b6841070  r0 : 0138dad0
[  306.927495] Flags: NzCv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
[  306.927515] Control: 00c5387d  Table: 04470008  DAC: 00000055
[  306.927529] CPU: 0 PID: 285 Comm: hass Tainted: G         C        5.15.32+ #1538
[  306.927551] Hardware name: BCM2835
[  306.927562] Backtrace:
[  306.927581] [<c08c0ed4>] (dump_backtrace) from [<c08c111c>] (show_stack+0x20/0x24)
[  306.927650]  r7:00000070 r6:00000000 r5:c0c1f0bc r4:c0acf364
[  306.927663] [<c08c10fc>] (show_stack) from [<c08c45d4>] (dump_stack_lvl+0x24/0x28)
[  306.927712] [<c08c45b0>] (dump_stack_lvl) from [<c08c45ec>] (dump_stack+0x14/0x1c)
[  306.927760]  r5:c0c1f0bc r4:c0c2c090
[  306.927771] [<c08c45d8>] (dump_stack) from [<c0010788>] (show_regs+0x1c/0x20)
[  306.927833] [<c001076c>] (show_regs) from [<c059b058>] (sysrq_handle_showregs+0x40/0x4c)
[  306.927883] [<c059b018>] (sysrq_handle_showregs) from [<c059b90c>] (__handle_sysrq+0x84/0x14c)
[  306.927922] [<c059b888>] (__handle_sysrq) from [<c059ba00>] (handle_sysrq+0x2c/0x44)
[  306.927974]  r10:ffffe000 r9:00000070 r8:00000000 r7:00000070 r6:c0c906e0 r5:00000067
[  306.927989]  r4:c1873c20
[  306.927999] [<c059b9d4>] (handle_sysrq) from [<c05bad7c>] (pl011_fifo_to_tty+0x214/0x234)
[  306.928045] [<c05bab68>] (pl011_fifo_to_tty) from [<c05bc04c>] (pl011_int+0x32c/0x454)
[  306.928099]  r9:c0c1f028 r8:40000193 r7:00000051 r6:00000101 r5:00000040 r4:c1873c20
[  306.928112] [<c05bbd20>] (pl011_int) from [<c006e5c4>] (__handle_irq_event_percpu+0x74/0x1d0)
[  306.928167]  r10:ffffe000 r9:c37e9f20 r8:c10e1400 r7:00000051 r6:00000000 r5:c0c1f028
[  306.928182]  r4:c65eac80
[  306.928194] [<c006e550>] (__handle_irq_event_percpu) from [<c006e758>] (handle_irq_event_percpu+0x38/0x88)
[  306.928243]  r10:eb604631 r9:0000002c r8:00c5387d r7:00000059 r6:00000000 r5:c0c1f028
[  306.928258]  r4:c10e1400
[  306.928267] [<c006e720>] (handle_irq_event_percpu) from [<c006e7e0>] (handle_irq_event+0x38/0x4c)
[  306.928309]  r6:00000000 r5:00000000 r4:c10e1400
[  306.928321] [<c006e7a8>] (handle_irq_event) from [<c0072924>] (handle_level_irq+0xbc/0x12c)
[  306.928369]  r5:00000000 r4:c10e1400
[  306.928380] [<c0072868>] (handle_level_irq) from [<c006de8c>] (handle_domain_irq+0x60/0x7c)
[  306.928421]  r5:00000000 r4:c0d069c0
[  306.928431] [<c006de2c>] (handle_domain_irq) from [<c00092e0>] (bcm2835_handle_irq+0x38/0x40)
[  306.928480]  r7:00c5387d r6:ffffffff r5:c0c1fa5c r4:c37e9fb0
[  306.928492] [<c00092a8>] (bcm2835_handle_irq) from [<c0008f8c>] (__irq_usr+0x4c/0x60)
[  306.928525] Exception stack(0xc37e9fb0 to 0xc37e9ff8)
[  306.928549] 9fa0:                                     0138dad0 b6841070 eb604631 0049becc
[  306.928579] 9fc0: 016fea08 000b1c10 0007cf1c 00000011 b6841070 0000002c eb604631 eb604631
[  306.928603] 9fe0: 016fea08 bec0f3e0 0047ec94 000b1fe4 a0000010 ffffffff
[  306.928622]  r5:a0000010 r4:000b1fe4
[  306.928640] sysrq: Show Regs
[  306.937281] CPU: 0 PID: 285 Comm: hass Tainted: G         C        5.15.32+ #1538
[  306.937310] Hardware name: BCM2835
[  306.937324] PC is at 0xb1fe4
[  306.937344] LR is at 0x47ec94
[  306.937358] pc : [<000b1fe4>]    lr : [<0047ec94>]    psr: a0000010
[  306.937374] sp : bec0f3e0  ip : 016fea08  fp : eb604631
[  306.937389] r10: eb604631  r9 : 0000002c  r8 : b6841070
[  306.937403] r7 : 00000011  r6 : 0007cf1c  r5 : 000b1c10  r4 : 016fea08
[  306.937418] r3 : 0049becc  r2 : eb604631  r1 : b6841070  r0 : 0138dad0
[  306.937434] Flags: NzCv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
[  306.937457] Control: 00c5387d  Table: 04470008  DAC: 00000055
[  306.937471] CPU: 0 PID: 285 Comm: hass Tainted: G         C        5.15.32+ #1538
^C
pi@rpi1:/sys/class/gpio/gpio14 $
pi@rpi1:/sys/class/gpio/gpio14 $ Connection to 192.168.1.3 closed.

Pretty scary stuff. I was connected over SSH and it stopped responding every so often. I am running Home Assistant (hass) on the Raspberry Pi, the log seems to mention it.

EDIT: The system partition itself was corrupted, it wasn't mountable and recognized as ext4. Using fsck.ext4 on it seems to have fixed it and it's bootable again.

Your Answer

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

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