Memory Loss? Brownout detector required?
Joms
Posts: 279
I am in the process of building a few prototype boards onto a printed circuit board I had made.· The problem is that I can load the EEPROM and the unit works fine, until I remove power and re-apply.· Then it does random things such as one cog not starting.· To correct this I reload the EEPROM or even re-load the RAM and it will correct the problem until the next power cycle.
I attached a quick copy of my layout, but pulling my hair out as to why this is happening...· I have four seperate boards put together now and they are all doing the same thing....··· Does anyone have any ideas on what could cause this?·· Do I need to add some type of a brown-out detector like on the BS2?
Thanks in advance for any ideas...
I attached a quick copy of my layout, but pulling my hair out as to why this is happening...· I have four seperate boards put together now and they are all doing the same thing....··· Does anyone have any ideas on what could cause this?·· Do I need to add some type of a brown-out detector like on the BS2?
Thanks in advance for any ideas...
Comments
But the weird part is that the Prop will work fine to the working channels, but until I do a reload of the RAM, all don't work. I am assuming it can't be an EEPROM problem because it shows verifying and does not bring up any errors.
If it was reseting the Prop, wouldn't they all not work?
Forget it, I keep looking at the bottom device as the EEPROM, too much of a rush, have to go.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 3/6/2010 11:08:44 PM GMT
I read the Prop Manual and it appears that even though I press F11 to load the EEPROM, it still loads the RAM off the computer. So, what is happening, is that if I load the RAM off the computer it works great, if I load it off of the EEPROM (after power fail), it has different problems.
I highly dought I have several bad EEPROM's? If the spin software verifies after writing and no error, doesn't that mean its wired properly?
Any ideas would be extreamly helpful on this one....
I don't see anything obvious in your schematic. Make sure all Vdd and Vss pins are connected
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Am I correct in this statement?
1240 / 8 = 15.500 KB (32KB EEPROM so about half used?)
I have double and triple checked all the grounds, +3.3v, pull-up resistor and data connections. I have also used a meter to make sure it isn't a joint.
Potatohead: I have also tried this. I should only be using 5 cogs, but the problem is as I start with one and keep working up, it will appear to work until I start getting to the upper numbers. I am starting to think it is a memory over run because of this.
Also, if I load the entire program, it will only act up for the first few minutes, then it will straighten out on its own and start working again. I know, sounds almost impossible, but it does. Would this be after the variables re-write themselves a few times?
Ideas on how to check for a memory over-run?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Basically my cogs go as follows...
Cog0 - General Program
Cog1 - Serial Control
Cog2 - Video 1 Out
Cog3 - Video 2 Out
Cog4 - Video 3 Out
Cog5 - Video 4 Out
Cog6 - WatchDog (resets device if unit locks up)
Cog7 -
I let the cogs open under whatever address they want as I'm using the same object for cogs 2,3,4,5.
EDIT -·Would this problem cause it to act random for the first few minutes its power up, then work fine after that?·· Basically by weird, I mean that 1 or 2 of the video channels will not work, but it is not consistant from trial to trial...
How about attaching the source program of your program to a followup message? Do NOT cut and paste your code into a message. Use the Post Reply button instead of the Quick Reply box and you'll see a button for the Attachment Manager which is what you should use.
That leaves active display buffer memory to contend with. If everything ends up running in COGs, after init, you could use the whole HUB memory for display, so long as there is no SPIN operating at that time. If there is SPIN operating, overwriting memory is more difficult, because that needs to exist in the HUB, along with it's variable storage, stack, etc...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
How are your starting your cogs? Are you using coginit or cognew?
-Phil
Potatohead - I think that would work, except I want to be able to have different text on the four screens.· I am actually using this with a LM1881 (four of them) chips to allow video overlay.
Basically the circuit works great, except when I load from the EEPROM it takes 1 or two of the displays up to 3-4 minutes to come on.
I recently added the watchdog also incase the program gets hung up in the serial receive part, it will reboot automatically.· I did try to comment this out, but has no effect on this problem....
On the other hand, if you've other issues, like the coginit, vs cognew, and buffers, you are working in a case where there are multiple unknowns, which is difficult to sort out. That's all I was getting at. I find with video things, controlling as much of the environment as possible is a good thing. Having established a solid foundation, then build things out, one by one, limiting changes to facilitate debugging and to not introduce new unknowns or variables along the way, means measured steps one can tackle more easily.
If the common buffer does not change things, you've narrowed the scope of your search considerably, which is a good thing too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Post Edited (potatohead) : 3/7/2010 6:49:20 AM GMT
What would be the easiest way to have all overlays look at one buffer? Because I am only really using two lines of text that are 18 charactors long, could I decrease the size? I did try to decrease the size, but when I move the text to a different position on the screen, it does not work properly.
Basically, when dealing with the variables, I don't think I am changing the right numbers causing more harm then good...
Each one also includes some 8x8 font data, that's 1K or so, that's shared by virtue of how SPIN works.
Each instance of the overlay calls out the @screen variable to reserve it's buffer space. Do that in the parent spin program, passing the address, the same address, to all four instances, or hard code it.
Just comment out where the overlay defines it's screen and plop an address in there instead.
I think your screen requirements can be met, but perhaps after things are running, and only at tested safe addresses, where things maybe overwritten after they are safely running on a COG.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Post Edited (potatohead) : 3/7/2010 7:04:16 AM GMT
Using cognew is the right approach.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
The pullup on SCL is not really required in most circumstances and these Propeller circuits may never require them but they are good practice and part of the I2C specification.
Of course you are free to do as you like with your circuit but this is a little "design note" for others then who may simply copy your circuit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
The code isn't spiking the boot EEPROM. That would let it load from Proptool, verify and load into the HUB ram, but not on repowering.
Edit
Just thought does it load back in the first place, the verify could only check it against the ram version, so the only bit that runs ok is the original ram loading from the Proptool, so there must be an over write happening. What if the WP pin on the EEPROM is raised before power is removed, and then repowering?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 3/7/2010 11:46:46 AM GMT
RE Your thoughts on brownout detectors, We come into this world and sociaty finds it is acceptable for nappies to be filled. We leave this world and sociaty accepts that nappies may be filled. It is only in the middle part of our lives that the facist state system robs us of the free choice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Toby: I understand the concern on the WP pin, but not quite sure how this could happen as they are using the same ground and +3.3. This is my first time using USB thru my own circuit and not relying on the Prop Plug. Could there be something I am missing here so that when I am plugging the USB in/out it causes adverse effects? Is it extreamly important to stop (safely remove hardware) before unplugging?
What do you mean when you say it isn't spiking the EEPROM? The code does load into RAM properlly from the PropTool, and appears to load properly to the EEPROM, however it does not work when power cycled. I have never had the unit not work when loading the RAM from the prop tool, however it only works about %25 percent of the time when loaded from the EEPROM. (hopefully that is clear as mud)
Peter: Thank you a TON for that info. I will keep these things in mind and actually when I get this problem solved, Im going to try and start moving them to one buss.
Potatohead: I attempted your idea of looking at one peice in the ram. I believe I am doing it correctly because when I go to object info it shows the RAM used is a lot less. However, I am still haveing the problem. Would that point to hardware then?
Everyone: THANK YOU a ton in helping with this problem, and for the humor, we need that to keep coming [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
When you're operating from EEPROM, do you also have your USB cable unplugged? I'm just trying to rule out the phantom reset issue that plagues designs using unbuffered FT232Rs. If it works with the cable plugged in, but not with it unplugged, there's a simple workaround: add a 1K pullup to pin A30.
-Phil
PhiPi: I am doing it with the USB pluged in. The device is actually USB powered, but now that you are saying these things, I don't remember this happening when I was using a battery. The 1K goes between 5v or 3.3v and pin A30 in what IC? The FT232R IC? I don't think there is a A30 Pin, on the Prop, A30 is already VDD.
Could you help clerify where that resister goes? Also, I am using a transitor, cap, and resistor just like is shown on the Prop Plug schematic. Am I doing something wrong here?