Problem writing settings to EEPROM

Talk about YBoxen, widgets, Propeller hacking, etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
MajorGrubert
 
Posts: 8
Joined: Thu Feb 19, 2009 4:48 pm

Problem writing settings to EEPROM

Post by MajorGrubert »

Hi,

I have been playing with my YBox2 for a while, and I have run into a problem trying to save settings to EEPROM, using the settings object. I wrote a simple widget to get information from a web server, parse it and present it on TV, similar to the Twitter widget. It works ok, unless I try to write a setting, such as the server IP address and port number, to the EEPROM, using the same code as the Twitter or the Info widget.

First of all, my current setup is an YBox2 with bootlader 1.1a (downloaded from this post). I have no problems uploading widgets to stage 2 and I have connected pin 7 of the EEPROM to VSS, using a haywire from pin 7 to pin 2. I am running the Propeller Tool v1.2.5 on Windows XP, inside a virtual machine with VMWare Server.

Second, if I use one of the example widgets provided at the download page, such as the Info widget or the Twitter widget, I have no problem changing settings through the web interface, and they are stored correctly. I can download the current settings using the /config.plist option in the bootloader and verify that they are stored ok. The bootloader can also save new settings, such as the admin password, without problems.

The problem begins when I compile and run my own widgets, or even if I compile an example (such as the Info widget) myself. Initially I downloaded a copy of the source files from draco's repository (at http://svn.deepdarc.com/code/ybox2/trunk/firmware/). After running into this problem, I wrote a simple widget that only shows the current settings and let me change them through a web interface (see attached file). Everytime I try to write the new settings, after I call to settings.commit the YBox2 basically hangs. The web server does no respond anymore, just the status LED stays in a blue flashing state.

Since the bootloader does not appear to have problems writing both settings and widgtes to EEPROM and it is based on revision 788 from the repository, I downloaded this revision and tried to compile my widgets with it. However, the same problem happens: the YBox2 hangs every time I try to commit new settings.

I have attached the widget I used to isolate the problem, in source and binary forms. Any help I could get diagnosing this problem is welcome.
Attachments
configtest.zip
Simple widget to change settings.
(15.81 KiB) Downloaded 246 times

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

Re: Problem writing settings to EEPROM

Post by darco »

Hmm... I'm able to reproduce your issue, I'm not immediately sure what is wrong. I'm looking into it.

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

Re: Problem writing settings to EEPROM

Post by darco »

Yep, there was a bad bug in the Fast_I2C_Driver.spin. It is now fixed in the SVN trunk. It should now be much more robust.

http://svn.deepdarc.com/code/ybox2/trun ... river.spin

MajorGrubert
 
Posts: 8
Joined: Thu Feb 19, 2009 4:48 pm

Re: Problem writing settings to EEPROM

Post by MajorGrubert »

darco wrote:Yep, there was a bad bug in the Fast_I2C_Driver.spin. It is now fixed in the SVN trunk.
Thanks, darco. I have just recompiled and tested my widget with the updated Fast_I2C_Driver. It's working fine.

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

Return to “YBox2 (discontinued)”