Smart Power firmware source on Github?

Moderators: mdrjr, odroid

Smart Power firmware source on Github?

Unread postby connorimes » Fri Apr 28, 2017 6:37 am

Although the original Smart Power appears to be deprecated, it would be great if the firmware source was made available on the hardkernel github account (rather than just the zip file linked from the wiki). There are some bugs in it that the community may like to fix and share. Would this be possible? It seems like pretty low maintenance to release new firmware versions for bug fixes.
connorimes
 
Posts: 9
Joined: Tue May 13, 2014 6:47 am
languages_spoken: english
ODROIDs: XU+E
XU3
XU4
Smart Power

Re: Smart Power firmware source on Github?

Unread postby rooted » Fri Apr 28, 2017 8:47 am

What bugs?

I have been using it 24/7 for a couple of years without any issue.

Are you on the latest firmware? I upgraded to it about a month ago and haven't noticed anything, of course I didn't notice anything on the previous version I ran for the two years I mentioned.
User avatar
rooted
 
Posts: 3653
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Smart Power firmware source on Github?

Unread postby rooted » Fri Apr 28, 2017 8:50 am

I wouldn't mind seeing the source on github, didn't mention that.
User avatar
rooted
 
Posts: 3653
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Smart Power firmware source on Github?

Unread postby connorimes » Fri Apr 28, 2017 11:19 pm

In timer.c, there are a few places in "ftoa" and "maesure_update" where it checks for values > 10 when the comparisons should be >= 10. This typically just causes the display to overflow during that iteration when the value in question is exactly 10. I did see another post that mentioned one instance of this, though the source code did not seem to get updated, but maybe the binary distribution was. I poll the device over USB, and while I haven't noticed the problem there, it believe it would throw off the start/end indexes of certain fields that I'm parsing from the string I get from the device.

Additionally, the Watt-hour counter (the field is misleadingly just named "watt") never checks for overflows. Experimentally I found that the value saturates at 8192.0. Frankly I believe the firmware should detect when it's going to overflow, roll back to 0, and make sure it adds back the additional overflow amount so that somebody polling the device can detect the overflow, act accordingly, and not lose any data. This is obviously an edge case and perhaps not very likely for most people to run into given that it can take weeks or more for the value to actually reach that high of a value.
connorimes
 
Posts: 9
Joined: Tue May 13, 2014 6:47 am
languages_spoken: english
ODROIDs: XU+E
XU3
XU4
Smart Power

Re: Smart Power firmware source on Github?

Unread postby rooted » Sat Apr 29, 2017 4:55 am

Ah you have PIC experience.
User avatar
rooted
 
Posts: 3653
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Smart Power firmware source on Github?

Unread postby connorimes » Sat Apr 29, 2017 6:29 am

No PIC experience, or really much of any firmware / microcontroller experience. Just software engineering experience and hands-on time with the ODROID Smart Power, limited documentation, other example code, and reading the firmware source. I resorted to doing this because I couldn't find a data format definition for the data stream received over USB and wanted to verify the behavior I had essentially reverse-engineered. If there were such a document and it matched what I expect, I believe the firmware would not currently meet the spec due to the aforementioned issues.

I figured the community could benefit from this firmware being made available for us to improve, esp. if the hardkernel folks will officially host the repository, handle PRs, and tag new releases.
connorimes
 
Posts: 9
Joined: Tue May 13, 2014 6:47 am
languages_spoken: english
ODROIDs: XU+E
XU3
XU4
Smart Power

Re: Smart Power firmware source on Github?

Unread postby rooted » Sat Apr 29, 2017 6:45 am

I think it's just too complex to support and now retired.

I could be wrong, I have no idea really. When I looked at the source and was going to attempt adding Bluetooth UART I was quickly turned off by the complexity, with too little documentation (in source).
User avatar
rooted
 
Posts: 3653
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Smart Power firmware source on Github?

Unread postby stmicro » Sat Apr 29, 2017 10:30 am

@connorimes
Do you have a bug list?
I've used the original SmartPower and new SmartPower2 everyday.
But there is no critical issue so far.
stmicro
 
Posts: 210
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen
languages_spoken: english, chinese
ODROIDs: 2 x C1+, 2 x C2
1 x XU-L, 2 x XU3-L, 3 x U3, 2 x U2, 9 x XU4

Re: Smart Power firmware source on Github?

Unread postby connorimes » Mon May 01, 2017 11:11 pm

@stmicro, the aforementioned issues about <=10 checks and the watt-hour counter saturation are all I'm aware of at the moment.
connorimes
 
Posts: 9
Joined: Tue May 13, 2014 6:47 am
languages_spoken: english
ODROIDs: XU+E
XU3
XU4
Smart Power


Return to Smart Power

Who is online

Users browsing this forum: No registered users and 1 guest