BBB won't power DOWN when power button is pressed

633 views
Skip to first unread message

William Pretty Security

unread,
Feb 28, 2015, 5:53:00 PM2/28/15
to beagl...@googlegroups.com

Hello all;

 

I can’t remember if there is a fix for this or not.

 

Basically when the USB-OTG port is connected to my PC, pulling the “power” signal low or

removing the +5V supply causes the BBB to power off briefly and then re-boot.

 

It seems to me that there must be a way to disable this, assuming that it is a “feature”.

 

Thanks ….

 

"No one could make a greater mistake than he who did nothing because he could do only a little."

"All that is necessary for the triumph of evil is that good men do nothing" Edmond Burke (1729 - 1797)

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

http://ca.linkedin.com/pub/bill-pretty/2b/b07/602

 

 

William Pretty Security

unread,
Mar 1, 2015, 2:19:27 PM3/1/15
to beagl...@googlegroups.com

Hello all;

 

It seem that the watchdog timer is automatically enabled when the USB-OTG port is connected to a PC.

I am running the latest Debian release, and I am wondering if is possible to disable watchdog after boot.

Or after a user login ?

 

Do I use something like “close(watchdog)” in a login script ? Or is there another/better way ??

 

Thanks;

 

Bill


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5646 / Virus Database: 4299/9178 - Release Date: 02/25/15

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5646 / Virus Database: 4299/9199 - Release Date: 02/28/15

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

toni incog

unread,
Mar 1, 2015, 2:46:06 PM3/1/15
to beagl...@googlegroups.com
I just tried with latest debian and ti-kernel installed.

Powered up with 5V and usb otg connected to pc. Remove 5V:

michiel@arm:~$
Broadcast message from root@arm (Sun Mar  1 20:38:52 2015):

Power button pressed
The system is going down for system halt NOW!

clean shutdown and stays off.

This is the pmic input driver sending an 'pwr_btn' event which is catched by acpid which does a clean shut down (see /etc/acpid/...)
So this seems easy to configure. Only it doesn't react the same as yours.

Now I'm going to look what you mean by watchdog (a black one? type beagle:)

regards,
Michiel

toni incog

unread,
Mar 1, 2015, 3:11:02 PM3/1/15
to beagl...@googlegroups.com
Ok, when I powered up with 5V and usb-otg connected to pc and I shortly press the power button I can replicate: clean shutdown and instant reboot

Don't know where the reboot is coming from.

here's pmic:
[ 2.897350] input: tps65217_pwr_but as /devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0

wrt. watchdog: I assume you mean /dev/watchdog I don't think I have it active.

toni incog

unread,
Mar 1, 2015, 3:25:32 PM3/1/15
to beagl...@googlegroups.com

power button:

Linux arm 3.14.34-ti-r52 #1 SMP PREEMPT Fri Feb 27 16:52:54 UTC 2015 armv7l
Hi!
Last login: Sun Mar  1 21:17:01 2015 from quad
michiel@arm:~$ sudo cat /dev/input/event0 | xxd
0000000: 1274 f354 ae73 0d00 0100 7400 0100 0000  .t.T.s....t.....
0000010: 1274 f354 ae73 0d00 0000 0000 0000 0000  .t.T.s..........
0000020: 1374 f354 1d02 0200 0100 7400 0000 0000  .t.T......t.....
0000030: 1374 f354 1d02 0200 0000 0000 0000 0000  .t.T............

Broadcast message from root@arm (Sun Mar  1 21:18:27 2015):


Power button pressed
The system is going down for system halt NOW!

... and system reboots
_________________________________________
5V remove:

Linux arm 3.14.34-ti-r52 #1 SMP PREEMPT Fri Feb 27 16:52:54 UTC 2015 armv7l
Hi!
Last login: Sun Mar  1 21:18:12 2015 from quad
michiel@arm:~$ sudo cat /dev/input/event0 | xxd
0000000: 5f74 f354 0cae 0100 0100 7400 0100 0000  _t.T......t.....
0000010: 5f74 f354 0cae 0100 0000 0000 0000 0000  _t.T............

Broadcast message from root@arm (Sun Mar  1 21:19:43 2015):


Power button pressed
The system is going down for system halt NOW!

.. and system stays off



William Pretty Security

unread,
Mar 1, 2015, 3:40:39 PM3/1/15
to beagl...@googlegroups.com

Hi Toni;

 

I think I have it figured out.

I have an image that works and one that doesn’t.

 

Watchdog Not enabled:

Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux

 

Watchdog enabled:

Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux

 

Image “bone47” works like yours does. Clean shutdown with no reboot and no “watchdog enabled” boot message.

It would appear that this was changed by version “bone50” <sigh>

 

Thanks to Google, I found a code snippit, that should work.

 

====================================================

dev = WATCHDOGDEV;

/* Once the watchdog device file is open, the watchdog will be activated by

      the driver */

   fd = open(dev, O_RDWR);

   if (-1 == fd) {

      fprintf(stderr, "Error: %s\n", strerror(errno));

      exit(EXIT_FAILURE);

   }

 

   /* The 'V' value needs to be written into watchdog device file to indicate

      that we intend to close/stop the watchdog. Otherwise, debug message

      'Watchdog timer closed unexpectedly' will be printed

    */

   write(fd, "V", 1);

   /* Closing the watchdog device will deactivate the watchdog. */

   close(fd);

======================================================

 

I just have to run it after login (I think).

 

Later;

 

Bill

 

"No one could make a greater mistake than he who did nothing because he could do only a little."

"All that is necessary for the triumph of evil is that good men do nothing" Edmond Burke (1729 - 1797)

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

http://ca.linkedin.com/pub/bill-pretty/2b/b07/602

 

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of toni incog


Sent: Sunday, March 01, 2015 3:11 PM
To: beagl...@googlegroups.com

--

For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages