I2C on ESP8266 broken in 1v92 and later, worked in 1v91

Posted on
Page
of 2
Prev
/ 2
  • Downloaded from github yesterday, and compiled on linux.
    Then I deleted flash and flashed the new version on an esp8266-01.
    I still can not see any errors here, but maybe I'm using a wrong eeprom?

    /* _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v95.61 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 512KB:256/256, manuf 0xc8 chip 0x4013
    >
    =undefined
    Hello World
    >
    =undefined
    >eeprom.read(0,10)
    =new Uint8Array([99, 55, 196, 4, 111, 81, 16, 0, 28, 0])
    >
    =undefined
    >eeprom.write(2,[55,99])
    =2
    >
    =undefined
    >eeprom.read(0,10)
    =new Uint8Array([99, 55, 55, 99, 111, 81, 16, 0, 28, 0])
    >
    =undefined
    > 
    */
    
    

    This is my test setup.


    1 Attachment

    • IMG_20180121_210800549_HDR.jpg
  • Frida - look at your test results again - your logs above show the problem occuring!

    You started with the first two bytes on the EEPROM being [99,55], then you wrote [55,99] to those bytes - and then read it back out and those two bytes were still [99,55] - just like what I see: Write doesn't work!

  • I've made some changes now for ESP8266 and software I2C that may fix this - but I'm working blind as I don't have an EEPROM on me to test with.
    With this FW image:
    http://www.espruino.com/binaries/travis/master/espruino_1v95.167_esp8266_4mb.tgz

    the waveforms look better on the scope - but I still can't get it to work correctly, and now I don't really understand why. Same symptoms though. I can't figure out why it's not working - especially because, as I mentioned, it doesn't fail with the scope connected.

    I'm not sure what's going on with the Software I2C. When using I2Ctouse=new I2C({scl:5,sda:4,bitrate:100000}); my scope refuses to trigger at all off of any I2C conditions. With the I2C triggering off, I don't see any signal going by at all when using software I2C...

  • Paul is writing to offset 2 eeprom.write(2,[55,99]), I also missed this on first sight :)

  • Tried today with an atmlu016 on breadboard, without pullup resistors and without capacitor. Can not see any problems here.

    /*
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v95.61 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 512KB:256/256, manuf 0xc8 chip 0x4013
    >
    =undefined
    Hello World
    {
      "sdkVersion": "2.0.0(5a875ba)",
      "cpuFrequency": 160, "freeHeap": 10576, "maxCon": 10,
      "flashMap": "512KB:256/256",
      "flashKB": 512,
      "flashChip": "0xc8 0x4013"
     }
    >eeprom.read(0,10)
    =new Uint8Array([99, 55, 255, 255, 255, 255, 255, 255, 255, 255])
    >
    =undefined
    >eeprom.write(2,[99,55])
    =2
    >eeprom.read(0,10)
    =new Uint8Array([99, 55, 99, 55, 255, 255, 255, 255, 255, 255])
    > 
    */
    
    
    

    2 Attachments

    • IMG_20180124_143842881.jpg
    • IMG_20180124_143614686.jpg
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

I2C on ESP8266 broken in 1v92 and later, worked in 1v91

Posted by Avatar for DrAzzy @DrAzzy

Actions