Mini2440 and LCD problem

seware
Using the mini2440 and A70 LCD.

I have been doing some proof-of-concept work with ucGUI. Had a working
image that would run the ucGUI demo and touchscreen successfully. Came back
a few days later and when I executed the image I got a screen flash and
board reset. First thought was that I had messed up something in the code
on accident. (working late at night sometimes does that), but I went back
to a previous base version that had worked and got the same result. Started
thinking... power problem. Tested: 
1) the 5V on the power supply alone (5.03 VDC)
2) 5V at the inside connector with barrel inserted after reset (5.01 VDC)
3) 5V at the inside connector after execution of code (drops to ~4.85 then
back up to 5.01)

On a whim I pulled the USB out after downloading the image but before
execution (executing over serial via u-boot). This time it worked! OK.
Weird but I have workaround, right? No...That worked for about 2 hours. But
now, nothing works with that image. Voltage drop is no greater... so what
gives? I'm thinking the LCD has an issue... drawing excess in-rush current
maybe. (Have tried two different 5V 2.0A wall warts). Also have done all
the basic stuff... reseated LCD connector, barrel, etc.

Now here is the kicker... The A70 test program that came with the board 
runs sucessfully every time! What?!?! So let me break down my questions:

1) How can an application work 1 day and not the next? (probably more
rhetorical than anything... but anyway... hardware failure... maybe?) 
2) If it's a hardware issue then why would the test app work and not the
other binary that worked previously? 
3) Is the source for the test app available somewhere? maybe it's setting
up the board differently?
3) At my wit's (whit's?) end. How do I troubleshoot? (I have ordered
another LCD ribbon and I may try a bench power supply tonight).
  
Thanks folks.

seware
Update (which only bewilders me more).

My program image works succesfully if I start the board on the NAND side,
but not if I start it from the NOR side. Note, that I'm not loading the
program from flash as of yet... only starting the u-boot and then loading
it to RAM over USB. Any reasons why starting from NOR would act any
differently (that would cause a board reset?)

davef
seware,

What follows are just some thoughts as I am not a bootloader expert.

As far as I am aware Supervivi is still in NAND as the primary bootloader.
And you have u-boot in flash.  I would verify that u-boot, or any other
bootloader can actually boot using USB.  

In all my playing about I never tried to start anything with the switch in
the NOR position.  Perhaps, you are trying to do something quite different.

With the original distro on the board could you start that either in the
NOR or NAND positions? 

Good luck!

seware
just to be clear I'm not trying to boot from USB. I'm booting in nor-mode
to the bootloader (u-boot) screen over serial monitor... then using DNW to
load my image to RAM and executing out of RAM. (this is early in the debug
stage where things are changing rapidly)

In my setup, I have u-boot in both nor and nand. (Having used u-boot for
many years, I flashed nor with u-boot...I like it better than vivi and it
works very successfully.)

In one of my previous jobs, as an embedded developer, we used nor during
development cycles and only used nand once we had a working stable image
(or a second-stage bootloader) to burn into nand. (back in those times,
nand still suffered from 'read disturb' issues and poor wear-leveling
algorithms)

I'm okay with booting from nand (modern flash advances being what they
are), but I'm now a bit worried that there is something hokey about my
hardware due to the differences I see between the results using the two
types of flash AND the two programs (2440test vs. myApp). 

In summary:
NOR and 2440test = GOOD
NAND and 2440test = GOOD
NOR and myImage = BAD
NAND and mymage = GOOD

Need to investigate more to figure out if the 2440test is setting up the
hardware differently in a way that makes it draw less current when the LCD
is initialized... being convinced that the board reset with my own image is
due to a voltage drop or something similar. 

At least I have a workaround... using myImage, booting from NAND. At least
until the magic smoke comes out.

TheRegnirps
I'm surprised your u-boot works OK in NOR. Supervivi (and Superboot2440) do
some magic to use all the features of Samsung's stepping stone boot
process. I'm wondering if there are some features you expect that are not
really working right. If you flash NOR with Supervivi does your image work?

Juergen Beisert
In fact booting from NOR is much simpler than booting from NAND. The
stepping stone RAM just contains the variable data in NOR mode. In NAND
mode it contains the program code *and* the variale data. NAND mode is more
tricky to keep the bootstrap code small enough to fit into the stepping
stone RAM.

@seware: regarding to NAND flash there is no difference nowadays from your
experience "in those times". Problems increase with the currently used
multi level cell NANDs. But there is no way out, also the NOR types start
to be of multi level cell...

TheRegnirps
Re: MLC versus SLC, industry experience is showing that SLC is far superior
for longevity and reliability. FriendlyARM now makes a Mini210S Black
Edition exclusively for AMRWorks and it is only available with 1GB SLC. For
OEM buyers it is also guaranteed to have no engineering changes for 2 years
at a time. A few other small changes were also made to improve OEM
useability.