Automatic shutdown at powerloss

Post here your applications done based on UPiS
Share your ideas about new possible applications

Re: Automatic shutdown at powerloss

Postby juiba » Tue Jul 15, 2014 1:25 pm

Hi again,

I think I got it. The bug kicks in when I unplug UPiS from the power source (I also get wall message from my fshut.py script that it would at this point shut the Raspberry down) and power UPiS back on before upissd.sh script is halts it. Once power is returned UPiS will cut power from Raspberry and UPiS goes to the stage that is visible in the video.

Hope this helps fixing the bug.

BR, Jussi
juiba
 
Posts: 24
Joined: Thu Jul 10, 2014 10:45 pm

Re: Automatic shutdown at powerloss

Postby nickglowsindark » Fri Jul 25, 2014 4:32 pm

I have been running 1.061 beta and have been seeing the same issue come up when power is restored right as the RPi is in the process of shutting down. Every time power is lost thereafter, the behavior is unexpected. Sometimes the RPi boots back up after shutting down running off of just battery power, most times the RPi doesn't boot up automatically at all once power is returned. During this time, the RPi has shutdown, but not powered off- the red PWR LED is still lit, and the UPiS BAT LED and STA LED are blinking. In order to boot the RPi back up, I have to press the SDWN button

Also, I don't know if it's a coincidence, but sometimes after this has occurred, the RPi no longer recognizes its IP address (I am using a wired LAN connection with a static IP address to connect to it via SSH to do most work), and I have to reboot it and try again. It seems odd that this would have anything to do with the UPiS, but I never saw this problem before. Now, it happens about 1 out of every 3 times the RPi boots up.

Even after running a @FACTORY command and resetting the UPiS (which I know worked, because the RTC has reset) all of this behavior continues.

It wasn't until I managed to flash 1.091 to the UPiS, and performed the @FACTORY that everything went back to the way it was before (I probably could have flashed any version, so long as it overwrote whatever was in there). Now, when I remove power the unit shuts down and *actually* powers off. When I plug it back in, it powers back up, and seems to recognize its IP address every time now.

I don't intend to try plugging it back in during the shutdown process until I see other people saying that the new firmware has fixed it, since this was an enormous hassle. Any word on how soon firmware 1.10 might come out? Hopefully some of the information in here can help narrow down some of the issues with this problem, if they haven't figured it out yet.
nickglowsindark
 
Posts: 5
Joined: Fri Jul 25, 2014 2:31 pm

Re: Automatic shutdown at powerloss

Postby Uwe12 » Thu Aug 07, 2014 2:57 pm

I got my UPiS Basic with FW V1.07 and was at first afraid to update the firmware. :oops:
The reason to use UPiS was to give the Pi a chance to shut down when power is lost to avoid damaging the file system.
So I did not plan to run the Pi for longer time on battery power.

I managed to set the reg 5 on 0x6b to a suitable value of 0x1a (that is 20sec USB power lost until shutdown) - as shown in answer #5 of this thread.
Still the Pi was not powered off completely (red LED on Pi remains on).

I noticed that the register's value seams not persistent but has to be set every time, the Pi boots.
Putting the i2cset command into rc.local (raspbian) didn't work, the register value after booting up still was 0xff.
I had to write a small script that is started from init.d - just as all system daemons. This worked, the value is now 0x1a any time I boot up my Pi.

Now I downloaded V1.091 and uploaded it with the python script into UPiS.
Still the value 0x1a is set and the Pi gets it's shutdown command after the 20sec.
...and the red LED goes off after a couple of seconds. So the whole shut down sequence takes round about 45sec.

I tried and repluged the power while shutdown was in progress: all fine, the Pi goes down, red LED going off and UPiS starts charging the battery.
But when unplugging the power then, the Pi seams to get a small starting reset (red LED on Pi is reactivated) and is cut from power a few seconds later - hope Pi was not able to do anything in that time.

After replugging the power the Pi boots up as intended.

Is there a more in-depth description of the i2c registers?
Uwe12
 
Posts: 1
Joined: Thu Aug 07, 2014 1:41 pm

Re: Automatic shutdown at powerloss

Postby Pimaster » Fri Aug 08, 2014 1:54 am

Hi,

Please find my answer in the text

I got my UPiS Basic with FW V1.07 and was at first afraid to update the firmware. :oops:

We are shipping with the latest available version of firmware, so probably your supplier has an older version of it.

The reason to use UPiS was to give the Pi a chance to shut down when power is lost to avoid damaging the file system.
So I did not plan to run the Pi for longer time on battery power.
This option is activated in the version 1.08 and further.

[b]please download it form here


https://app.box.com/s/f0pyhl3lj83gu7zzy25d

this functionality you are asking for is OK in this version.[/b]

I managed to set the reg 5 on 0x6b to a suitable value of 0x1a (that is 20sec USB power lost until shutdown) - as shown in answer #5 of this thread.
Still the Pi was not powered off completely (red LED on Pi remains on).

Use above version, and change the default value, to time you need as described in the table below

I noticed that the register's value seams not persistent but has to be set every time, the Pi boots.
Putting the i2cset command into rc.local (raspbian) didn't work, the register value after booting up still was 0xff.
I had to write a small script that is started from init.d - just as all system daemons. This worked, the value is now 0x1a any time I boot up my Pi.

OK

Now I downloaded V1.091 and uploaded it with the python script into UPiS.
The 1.091 has a small bug, we are working on,

Still the value 0x1a is set and the Pi gets it's shutdown command after the 20sec.
...and the red LED goes off after a couple of seconds. So the whole shut down sequence takes round about 45sec.
OK

I tried and repluged the power while shutdown was in progress: all fine, the Pi goes down, red LED going off and UPiS starts charging the battery.
OK
But when unplugging the power then, the Pi seams to get a small starting reset (red LED on Pi is reactivated) and is cut from power a few seconds later - hope Pi was not able to do anything in that time.
This is the bug, we are talking about

After replugging the power the Pi boots up as intended.

Is there a more in-depth description of the i2c registers?

see below, but notice that only in the official next update all registers will be active and confirmed

https://app.box.com/s/d99npgzmqf35o0citlol

As you can see there are a plenty of registers for dedicated functionality, including A/D converter
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1593
Joined: Fri Sep 14, 2012 7:50 am

Re: Automatic shutdown at powerloss

Postby Pimaster » Tue Aug 12, 2014 12:40 am

Hi,
Please upload the 1.095 is already listed.

Warmest regards
Pi Master
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1593
Joined: Fri Sep 14, 2012 7:50 am

Previous

Return to UPiS Users Application

Who is online

Users browsing this forum: No registered users and 1 guest

cron