Git Product home page Git Product logo

eeprog's People

Contributors

ao2 avatar hgxl64 avatar tat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eeprog's Issues

Add support for write protect pins

The utility does not seem to support dts wp-gpios entries.

I have the following dts node :

eeprom@50{
    compatible = "microchip,24c512", "atmel,24c512";
    wp-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>; /* set wp-gpios to EEPROM-WP */
    reg = <0x50>;
};

When I use date | eeprog -f -16 -w 0x00 /dev/i2c/by-id/pm 0x50 and then eeprog -f /dev/i2c/by-id/pm 0x50 -16 -r 0x00:0x100 | hexdump -C to read the data back. The data is not properly written into the eeprom.

I should manually set my WP pin to a correct value in order for the data to be properly written.

Application fails with 'stack smashing detected' message

Hi!

I'm trying to read 24Cxx chip using eeprog and I always see next message:

./eeprog-0.7.6 # ./eeprog -f /dev/i2c-7 0x50 -r 0:256 
eeprog 0.7.6, a 24Cxx EEPROM reader/writer
Copyright (c) 2003-2004 by Stefano Barbato - All rights reserved.
  Bus: /dev/i2c-7, Address: 0x50, Mode: 8bit
*** stack smashing detected ***: terminated
Аварийный останов

I saw this guy forked your project and fixed this:
alvintpwang@8ffb913

So this fix works for me too. Also I see that some people on the internet also have this issue.

Hope it helps. Thank you for your hard work!

Always 'write error' and 'No such device or address' messages on all my writing attempts

When I trying to write eeprom I see next error:

# cat dump1 | ./eeprog -f /dev/i2c-7 0x50 -w 0
eeprog 0.7.6, a 24Cxx EEPROM reader/writer
Copyright (c) 2003-2004 by Stefano Barbato - All rights reserved.
  Bus: /dev/i2c-7, Address: 0x50, Mode: 8bit
  Writing stdin starting at address 0x0
Error i2c_write_2b: No such device or address
Error at line 150: write error

I've fixed this by editing i2c_write_2b() from 24cXX.c file where I updated line 46 to usleep(10000); and this solved issue.

I can create a PR if you don't mind.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.