Register
Results 1 to 9 of 9
  1. #1
    Newbie
    Join Date
    Jan 2022
    Posts
    7
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default Read/write 24LC32A for Skoda Swing (Delphi) with Raspberry Pi

    Hello everyone!
    I’d like to read eeprom dump from Skoda Swing’s 24LC32 with Raspberry Pi. Yes, I know there are several easier ways, but this is the challenge now.
    So, I wired an empty DIP8 24LC32A with rPi (Vcc, Vss, WP, SDA, SCL) and ran i2cdump. It turned out, that i2cdump uses only 8-bit (or 7, I’m a bit confused) address which is obviously not enough, since 24LC32A requires 9 bits (0x000...0xFFF). However, i2cdump can read until 0xFF, so partial success.
    Further problem is that i2cget and i2cset is not working for me, I receive error if I try to read/write anything from 0x00 to 0xFF (WP is pulled to Vss).
    I googled a bit but haven’t found any working solution.
    Has anybody managed to read/write this eeprom with rPi?

  2. #2
    V.I.P. Member
    shooting's Avatar
    Join Date
    Feb 2010
    Location
    WALES
    Posts
    22,996
    Thanks Thanks Given 
    35,136
    Thanks Thanks Received 
    41,770
    Thanked in
    15,467 Posts

    Default

    Quote Originally Posted by mucden View Post
    Hello everyone!
    I’d like to read eeprom dump from Skoda Swing’s 24LC32 with Raspberry Pi. Yes, I know there are several easier ways, but this is the challenge now.
    So, I wired an empty DIP8 24LC32A with rPi (Vcc, Vss, WP, SDA, SCL) and ran i2cdump. It turned out, that i2cdump uses only 8-bit (or 7, I’m a bit confused) address which is obviously not enough, since 24LC32A requires 9 bits (0x000...0xFFF). However, i2cdump can read until 0xFF, so partial success.
    Further problem is that i2cget and i2cset is not working for me, I receive error if I try to read/write anything from 0x00 to 0xFF (WP is pulled to Vss).
    I googled a bit but haven’t found any working solution.
    Has anybody managed to read/write this eeprom with rPi?
    Which OS are you running? I use Debian Wheezy and a compiled reader, I find this made things easy

    wbr


    EDIT: or just use a PI Pico to program chips --> Raspberry Pi Pico - Control the (I/O) World - YouTube
    Last edited by shooting; 3rd February, 2022 at 09:02 AM.
    ----------------------------------------------------------------------------------------------------------------------------

    Don't confuse "Standing on my Shoulders" with "Treading on my Toes" ..

  3. The Following User Says Thank You to shooting For This Useful Post:

    Decode Ghost (3rd February, 2022)

  4. #3
    Newbie
    Join Date
    Jan 2022
    Posts
    7
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    I use Raspbian. And 1st gen rPi model B rev2 as hw if that counts.
    Last edited by mucden; 3rd February, 2022 at 09:06 AM.

  5. #4
    V.I.P. Member
    shooting's Avatar
    Join Date
    Feb 2010
    Location
    WALES
    Posts
    22,996
    Thanks Thanks Given 
    35,136
    Thanks Thanks Received 
    41,770
    Thanked in
    15,467 Posts

    Default

    Quote Originally Posted by mucden View Post
    I use Raspbian. And 1st gen rPi model B rev2 as hw if that counts.
    Ah ok, might just be easier to just switch to a PI Pico, Raspbian is ok but Wheezy gives a better platform for programming.
    I2C C++ programmer works well and will fill all chip data in both 8bit and 16bit

    wbr
    ----------------------------------------------------------------------------------------------------------------------------

    Don't confuse "Standing on my Shoulders" with "Treading on my Toes" ..

  6. #5
    Newbie
    Join Date
    Jan 2022
    Posts
    7
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by shooting View Post
    Ah ok, might just be easier to just switch to a PI Pico, Raspbian is ok but Wheezy gives a better platform for programming.
    I2C C++ programmer works well and will fill all chip data in both 8bit and 16bit

    wbr
    Ok, I keep it mind as plan B.
    I found this wiki in the mean time: https://wiki.st.com/stm32mpu/wiki/I2...vices_handling
    I'll check it on my setup in the evening.

  7. #6
    Newbie
    Join Date
    Jan 2022
    Posts
    7
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Well I'm sure now, that I'm not sure what I read and what I write :-S
    I'm nut sure, that i2cdump shows the real data on 0x00...0xff.
    I've tried to write with i2cset, but seemed unsucessfull despite no error message. I've seen no change on 0x00...0xff.
    I've also tried to write with i2ctransfer, but it seems to ended with cyclic write on some adresses instead of writing only one.

  8. #7
    V.I.P. Member
    shooting's Avatar
    Join Date
    Feb 2010
    Location
    WALES
    Posts
    22,996
    Thanks Thanks Given 
    35,136
    Thanks Thanks Received 
    41,770
    Thanked in
    15,467 Posts

    Default

    Quote Originally Posted by mucden View Post
    Well I'm sure now, that I'm not sure what I read and what I write :-S
    I'm nut sure, that i2cdump shows the real data on 0x00...0xff.
    I've tried to write with i2cset, but seemed unsucessfull despite no error message. I've seen no change on 0x00...0xff.
    I've also tried to write with i2ctransfer, but it seems to ended with cyclic write on some adresses instead of writing only one.
    I don't think it's possible with your current OS versions of i2xxx, these are known to have bugs and really only work on 24C01/2 simple chips.
    Make a Wheezy 4gig SD and use i2prog, this has been developed more and can handle chips out to 24C128
    or just opt for a PI Pico and use your RevB as a controller

    wbr
    ----------------------------------------------------------------------------------------------------------------------------

    Don't confuse "Standing on my Shoulders" with "Treading on my Toes" ..

  9. The Following User Says Thank You to shooting For This Useful Post:

    mucden (4th February, 2022)

  10. #8
    Newbie
    Join Date
    Jan 2022
    Posts
    7
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Finally I've managed to read and write with eeprog. I created a dummy dump and wrote it into the 24LC32A, then I could read it back (see pic). What I miss is saving the dump as binary. The output of eeprog is stdout by default, but it can be also a file. No matter what I choose the output is text based, not binary. So addresses, spaces, etc. are also there.
    Do you have any idea how to save the dump as binary in eeprog? Google doesn't have many topic on this. I'm afraid since the output of eeprog contains addresses and spaces by default there is no option to save the output as binary. Or I haven't found the right command yet to do so.
    2022-02-06_08h55_42.jpg
    Attached Images Attached Images
    Last edited by mucden; 6th February, 2022 at 09:11 AM. Reason: change attachment

  11. #9
    V.I.P. Member
    shooting's Avatar
    Join Date
    Feb 2010
    Location
    WALES
    Posts
    22,996
    Thanks Thanks Given 
    35,136
    Thanks Thanks Received 
    41,770
    Thanked in
    15,467 Posts

    Default

    Quote Originally Posted by mucden View Post
    Finally I've managed to read and write with eeprog. I created a dummy dump and wrote it into the 24LC32A, then I could read it back (see pic). What I miss is saving the dump as binary. The output of eeprog is stdout by default, but it can be also a file. No matter what I choose the output is text based, not binary. So addresses, spaces, etc. are also there.
    Do you have any idea how to save the dump as binary in eeprog? Google doesn't have many topic on this. I'm afraid since the output of eeprog contains addresses and spaces by default there is no option to save the output as binary. Or I haven't found the right command yet to do so.
    2022-02-06_08h55_42.jpg
    Only way is export data as a file, I think you'll get the info by "pi@raspberrypi: ~ eeprog $ eeprog -h" and look for the export line command
    I suspect it's "-F" .. Check here: Rasberry Pi I2C EEPROM Program - richud.com
    Example "./eeprog -f -i 2c02.bin -w 0x00 -t 5 /dev/i2c-0 0x57"

    wbr

    NOTE: Make sure you do this: sudo apt-get install i2c-tools hexedit - you'll need Hexedit
    Last edited by shooting; 6th February, 2022 at 04:37 PM.
    ----------------------------------------------------------------------------------------------------------------------------

    Don't confuse "Standing on my Shoulders" with "Treading on my Toes" ..

  12. The Following 2 Users Say Thank You to shooting For This Useful Post:

    budata (6th February, 2022), Mankyro (6th February, 2022)

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.