1
\$\begingroup\$

I've been experimenting with Python scripts and using an Teensy 2.0 ++ to program different flash memories. So far I've found a script to program a 29GL128, which works perfectly, but I'm trying to change it so that it can also program a 29GL256 chip (datasheet here)... but I seem to be stuck on the A23 address line.

The problem I'm having is that the Teensy is driving the A23 address line high during the entire write, and other than me pulling it low manually with a resistor I cannot manage to find the part in this script that controls the A23 line. This only lets me write to the top half of the chip...which isn't what I want.

I was hoping someone here that has some experience with either Python or programming Flash memory could take a look at this script and tell me what needs to be changed, and ideally how that change works.

Thanks!

\$\endgroup\$
  • \$\begingroup\$ I'm a python novice, but I suspect your problem is on line 264 where 0x80 is being or'ed over the value of the highest byte. This would almost certainly be setting the A23 bit high permanently. \$\endgroup\$ – brhans Sep 15 '16 at 20:50
  • \$\begingroup\$ How would I rewrite that to have it work without the OR? It seems any other combination I use errors out. \$\endgroup\$ – mikerakesh Sep 15 '16 at 21:46
  • \$\begingroup\$ self.write(((v >> 16), (v >> 8) & 0xff, v & 0xff)) should work ... don't know if the multiple (()) are necessary - but as I said - python noob. \$\endgroup\$ – brhans Sep 15 '16 at 21:49
  • \$\begingroup\$ Seems that the 0x80 is required, if it's removed I get a bunch of errors. Can't even pull the chip ID. \$\endgroup\$ – mikerakesh Sep 15 '16 at 21:56
  • \$\begingroup\$ What firmware do you have in the Teensy? \$\endgroup\$ – Bruce Abbott Sep 16 '16 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.