• I'm having problems with I2C1 on pins B8/B9 on v71.

    Is this a general problem, or have I done something bad to my Espruino?

    Testing with known working AT24:

    
    >I2C1.setup({sda:b7,scl:b6});
    =undefined
    >I2C1.writeTo(0x50,[0,0]); //Works fine
    =undefined
    >I2C1.setup({sda:b9,scl:b8}); //at this point, I moved the wires over to B8/9
    =undefined
    >I2C1.writeTo(0x50,[0,0]); //now it doesn't work
    =undefined
    Uncaught InternalError: Timeout on I2C Write Transmit Mode 2
     at line 1 col 24
    I2C1.writeTo(0x50,[0,0]);
                            ^
    >I2C1.setup({sda:b7,scl:b6}); //Moved the wires back
    =undefined
    >I2C1.writeTo(0x50,[0,0]); // and it works again
    =undefined
    
    

    Actually, what the heck is going on? I2C2 was working, but now I can't get it to work at all, with any of multiple devices that were working until at least very recently... And downgrading doesn't fix it... I2C1 on B6 and B7 seems to work reliably though..

    It may have started when I installed an external crystal, but I removed that, and it's still not working, though it has worked a few times.

    Any thoughts? I'm starting to question my own sanity here.

  • I'm not sure what to suggest - it's not just that a resistor has fallen off or a wire has broken?

    I don't think I've changed anything related to I2C recently.

    Other thing is I guess you're using the BigRam build - so have you cleared the saved program out of flash?

  • Very strange - still do not understand what happened, but I haven't been able to reproduce it since. It was persistent when it was happening though - nothing I could do seemed to make those I2C ports work.

    It was happening with both normal and bigram builds.

  • And you're sure this was 1v71 and not one of the Github builds? The current issue with the stopped RTC could possibly have broken this.

  • I encoutered it first on a github build, then flashed the normal release to see if the problem reproduced there, and it did, for the rest of that evening, but not since.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Is it just me, or is I2C1 on pins B8+B9 not working in v71?

Posted by Avatar for DrAzzy @DrAzzy

Actions