ANy issues with latest SNV source? Bootloader v1.1 issues

Talk about YBoxen, widgets, Propeller hacking, etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Hi all I'm having issues with the v1.1 bootloader from SVN latest.
It's aborting load on the twitwidget.binary also built from latest...

Symptoms:
Stops dead with unhappy sound... and red led.
curl ends with screen full of F0 F0 F0 F0.... over and over

This is highly repeatable.

Now... anybody know what the problem is?
Also, do we have the v1.0 bootloader.binary somewhere for download?

All help appreciated!

-Stephen

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

Sounds like it isn't properly writing the firmware to the EEPROM.

The most likely explanation is that it is the write-protect problem rearing it's head again.

The write protect pin on the EEPROM really should have been explicitly pulled low. There is an internal pull-down which should pull the write protect low when left unconnected, but this is apparently unreliable.

I have never personally run into this problem with my own kits, but I have seen other people run into this problem before.

The solution is to explicitly tie Pin 7 (should be write protect, please verify first) on the EEPROM to VSS.

Give this a try and let me know if this works.

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: Any issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Thanks for the quick reply! Here are my test results:

Connected pin7 to vss.
(Datasheet agrees with pin7 is WP)

Further test shows no change in behavior...

Leaving it connected.

I'm up for more suggestions. Oh, by the way. Which of the other errata
still apply? (I purchased my kit from ThinkGeek if that helps ID what H/W I have.)

-Stephen

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by adafruit »

the errata is for the v1.0 kits which are the only ones out there (PCBs are ordered in big batches)
but the majority seem to work fine so im not sure what could be causing this...

but to be clear, you built the kit and then -reloaded- the bootloader on using a propplug or similar? did the bootloader work before that? do any other widgets load?

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Correct. After building the kit and testing at each phase of build (per instructions)
all was working well.

I downloaded the .binary files for all three widget examples from the site
and tested each. Other than a problem with running twitwidget after alarmwidget
and it not picking up the correct parameters (trying to get twitter info from
the navy site just does not work... maybe annoys the navy time site ;-0)

Then my next effort was to download the latest from SVN and prove that I could
build and run everything.

rebuilt each the the three widgets, tested and all worked as from the original .binary files.

Then I moved on the to bootloader. Used the stage two process for loading a new bootloader
and that worked fine. I proved my bits ran. Well, sortof... now two of the three widgets work
and the third failed to download as described in starting post.

Also, download of the bootloader itself also fails with the same error... hrmf...

Yes, I do have a prop-plug so I'm not crippled here but I also have not much running ;-)

---------------------------------------------------------------------------
FYI- This is not my first propeller project (liked building the kit, btw!)

My own design: http://propcan.moraco.us
http://propcandev.blogspot.com/

Also, I've built and revised drivers for the brilldea PropBlade. Also a fun build!
http://brilldea.com/product_PropBlade.html
and
http://brilldea.com/product_LEDPainter.html
---------------------------------------------------------------------------

Regards,
Stephen

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

P.S. this kinda feels lilke a memory overrun or timing issue... if that helps...
the failures seem to be in a fixed location relative to each failing download.

Meaning, for example, that the twitwidget download... the progress dots
stop at the same location each time. 5th row of dots, last eight dots
not shown on last (5th row end).

This help?

-Stephen

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

Well, one possibility down, a few more to go...

Try installing this pre-built v1.1 binary: http://www.deepdarc.com/bootloader_v788.binary

This is the same bootloader I've been using in all of my own personal yboxen, and I've had no problems. I've been very busy at work so I haven't had time to work on it recently, but as-is it really is superior to v1.0.

What operating system are you using for your comptuer?

Also, when the upload fails, does the light blink? If it does blink, it should blink several times and then give you a long fading blink. Count the number of blinks between the long fading blink and that may help me diagnose what is wrong. An error number may be printed to the screen as well.

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

I have a fix. Will commit it to SVN soon.

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

try svn revision 789.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by adafruit »

<whew> OK good to hear its a power-user problem! i was a little worried that there were a couple dozen ybox2 users who couldn't upload at all. which reminds me i really ought to try & fix the twitter widget.... :|

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Wow... after a bit of work locating problem with my RGB LED i'm back on the air.

Built bootloader from SVN and download problem is fixed (you changed to retry-write loops?
am i reading the change correctly?) but...

The bootloader_v788 binary you suggested, works well too.

But, when I first built and tested w/bootloader.spin from 789 I couldn't download/run any stage2 stuff.

Then I diff'd the 788/789 trees that I had and found that you modified Fast_I2C_Driver.spin as
well. As soon as I built with both I'm completely working again.

Thanks for the quick help!!!

Now... what first widget should I create???

(Are there Widget ideas that either of you have had but have not had time to implement?)

-Stephen

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

Basically there is some sort of race condition inside of Fast_I2C_Driver.spin which I haven't located yet. Some hardware it happens 100% of the time on. On other hardware it happens less often.

I found that by simply retrying until a block write was successful worked for me in every case I have run into. This is certainly not ideal---and I had intended to get around to fixing the bug in the fast_I2C_driver---but it works for now.

Sorry for all of the confusion. I thought I had uploaded those changes long ago. I probably ended up holding off because I wanted to wait and commit a better version... but life intervened.

I'm glad to see that you are up and running again! v1.1a should be nicer overall than v1.0... Faster uploads, the ability to change the IP address, etc...

Just out of curosity, what sort of LED problems were you having? You can actually re-map the LED colors and/or intensities if they are wrong with a quick setting from the bootloader (not documented in the index). These changes persist across reboots! It works like this:

Code: Select all

http://admin:password@ybox2/ledconfig?<LEDCONFIG>
Where <LEDCONFIG> is the hexadecimal LED configuration value, as described in http://svn.deepdarc.com/code/ybox2/trun ... ubsys.spin , except in BIG ENDIAN byte order(I know... What was I thinking!?).

For example, lets say we want red on pin 9, green on pin 10, and blue on pin 11, common anode(I have several kits with this arrangement). You would use the following URL:

Code: Select all

http://admin:password@ybox2/ledconfig?090a0b10
Lets say that blue and green were way too bright... you would attenuate them like this:

Code: Select all

http://admin:password@ybox2/ledconfig?094a4b10

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Re: LED problem....

Do I have to admit what I did? :oops:

I had red and green but no blue. The instructions were careful about
pointing out two seemingly contradictory (in my mind...) aspects of LED
placement: common pin and flat side. Apparently I didn't resolve the two
correctly because I ended up with the common and the blue leads
reversed which makes for very little (read no) blue. :?

So, pull the prop., Ohm things out, power the LED discretely and
yep, it works. Found the two pins flipped, haven't failed like this
with RGB LEDs before... so got a chance to practice some troubleshooting
and some fairly maddening rework of the two middle pins of a 4-inline-pin device. :wink:

Hey, Who says I can't create little games for myself as I'm bringing up a new board?

Thanks again for your quick help.
Let's keep chatting. I've begun reading the code a bit.
You've shown me how to do some things in a better fashion on my own project. _very cool_
which is one of the reasons why I do these projects!
I've much more to read, yet.

Regards,
-Stephen

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by StephMo »

Oh, if you wanted to... I've some pretty good logic analysis equipment here (guess what I do).
We could make a stab at trying to capture the I2C failure by running with the older code
and seeing what the failure looks like... (just a thought)

You can see how I use it at my turn-on blog: http://propcandev.blogspot.com/

-Stephen

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: ANy issues with latest SNV source? Bootloader v1.1 issues

Post by darco »

I unfortunately don't have any free cycles to work on that issue at the moment, but If you'd like to take a stab at diagnosing the issue, feel free... If you manage to fix it, I'll happily merge in your patch and give you credit.

I'm glad that you've gotten some ideas from reading over the code! Just keep in mind that some of the code is a mess. (I blame this squarely on Parallax. Spin is a very difficult language to write a modular network stack in.)

The following files are well-audited and good example code: The following files are a bit more of a mess, but I'm sure many gems could come from them:

Locked
Please be positive and constructive with your questions and comments.

Return to “YBox2 (discontinued)”