eevansx / glcd-arduino

Automatically exported from code.google.com/p/glcd-arduino
0 stars 0 forks source link

GLCD init code needs to wait on reset #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The GLCD init code does not poll the RESET signal from the module.
Currently, it cheats and simply waits a few milliseconds
but only if it asserted reset.
Pauls teensy to glcd adapter asserts reset with a long pulse so the
init code tries to talk to the module while reset is still asserted.

So the code should be modified to poll reset.

Original issue reported on code.google.com by bperry...@gmail.com on 24 Mar 2011 at 6:49

GoogleCodeExporter commented 9 years ago
The code has been updated to do a blind wait of 250ms for teensy code.
See the SVN log for glcd_Device.cpp for full details. version r324

Original comment by bperry...@gmail.com on 24 Mar 2011 at 6:50

GoogleCodeExporter commented 9 years ago
Polling reset is not reliable. The voltage threshold for the reset status and
the actual reset to the modules are different. As a result whenever you
have a slow rising reset (as the teensy glcd adapter does) the reset status
can be gone while the module's cpu is still in reset.

The final solution is that the Init() code now still does a blind wait but then 
checks for BUSY and RESET status.
It will now return error status codes if either of these is set.
This was added in r436
This will also prevent glcd diags from hanging in initialization when the glcd 
is miswired so it can return an error status to the user.

Original comment by bperry...@gmail.com on 14 Dec 2011 at 12:05