• AVR Freaks

Hot!DRV_I2C address

Author
amg
Starting Member
  • Total Posts : 58
  • Reward points : 0
  • Joined: 2014/02/15 11:19:58
  • Location: 0
  • Status: offline
2020/06/02 08:45:13 (permalink)
0

DRV_I2C address

Hi all!
 
I'm trying to update a project that was created on Harmony V1.06 to Harmony3. There's a I2C communication that was working successfuly with the old pheriperal library, but I can't make it working with the Harmony3 I2C driver... The driver address handling is not so clear to me.
 
Basically I'm trying to make this function from the Harmony3 driver:
bool DRV_I2C_WriteTransfer( const DRV_HANDLE handle, uint16_t address, void* const writeBuffer, const size_t writeSize)

compatible with this one:
bool i2c_write(unsigned char hardware_address, unsigned char register_address, unsigned char length, unsigned char const *data))

I saw on the example "i2c_eeprompic32mz_w1_curiosity_freertos" that the register address is the first byte from the data buffer so I tried like:
 
bool i2c_write(const DRV_HANDLE handle, unsigned char slave_addr, unsigned char reg_addr, const size_t writeSize, unsigned char *writeBuffer)
{
    int i;
    appData.I2C_TxBuffer[0] = reg_addr;
    for(i=0;i<writeSize;i++){
        appData.I2C_TxBuffer[i+1] = writeBuffer[i];
    }
    if (DRV_I2C_WriteTransfer( handle, slave_addr, (void *)appData.I2C_TxBuffer, (1 + writeSize)) == true)
    {
        return true;
    }
    else
    {
        return false;
    }
}
 
 ..but no success.
 
Any suggestion?
Many thanks in advance.
post edited by amg - 2020/06/03 04:56:31
#1

12 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 630
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: DRV_I2C address 2020/06/03 05:54:14 (permalink)
    4 (1)
    PIC32MZ I2C may need "BitBang" selected due to hardware issues in the IC, check latest errata for your PIC.
     
    #2
    DominusT
    Super Member
    • Total Posts : 1424
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: DRV_I2C address 2020/06/03 05:55:36 (permalink)
    0
    Do you have a logic analyzer so you can "see" if there is something on the I2C port?
    #3
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/03 07:02:53 (permalink)
    0
    Ok, I don't really know what BitBang is. So, What you suggest is to configure harmony for using the I2C_BB driver instead, no?

    The old project version based on the harmony v1.06 was working and I don't remember anything about using BitBang, Is it a bug from the newer Harmony versions or was it there since the beginning?

    Thanks!
    #4
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/03 07:04:29 (permalink)
    4 (1)
    I have a digital scope and there's no movement on the SCL line...
    #5
    DominusT
    Super Member
    • Total Posts : 1424
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: DRV_I2C address 2020/06/03 07:11:10 (permalink)
    0
    amg
    Ok, I don't really know what BitBang is. So, What you suggest is to configure harmony for using the I2C_BB driver instead, no?

    The old project version based on the harmony v1.06 was working and I don't remember anything about using BitBang, Is it a bug from the newer Harmony versions or was it there since the beginning?

    Thanks!



     
    With H2:


    #6
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/03 07:47:39 (permalink)
    0
    I'm using Harmony3 and these are the only configurations that I have:
     
    [image]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArIAAADkCAYAAABkMcdDAAAgAElEQVR4Ae2dbY9c1ZXv6wPkZT5APgIt0o6J7le4L7EhkUwilLwio/suPEx0SWyDgrjhIuWJmEEzL+YKTxgl9s1ECByCNNIoxgLHxMK4aSe5iCTENvihjW0wyb5ap+pfvbx6n6fqqj51qn412tp7r7X22vv8zmry95nTXYPLly8nGgyoAWqAGqAGqAFqgBqgBvpWA4P/9j+PJBoMpl0D333yB4kGA2qAGqAGqAFqgBqYZQ0UQjbxgcAUCZgo5gMBCEAAAhCAAARmTWAsZK9+/GmiwW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s/IeAGqAGqAFqgBqgBqiB2dZAVsj+5Cc/STdv3kwff/xxunXrlv1p0C0f85vvwIEDleLzhz/8Ybp06VK6du1a0T766KMir+W2sdk3NjaKmP3791fmohhmWwzwhS81QA1QA9QANUAN9KkGskLWno7+/e9/H7ctKjalsa/uKer3v//9QhQrn4nfo0ePpl//+tfpb3/72ziPCdpHH30UIcurDtQANUANUAPUADVADVADjWogK2TtlQJ7Ymris+xjIvTTTz+tfbXAXikwkapcNl5dXU179+5Nn3zySZHecl25coVXCyjaRkXbp38pclaebFAD1AA1QA1QA7OrgVIha+Ly+vXr6fz589lmvjZCVq8RmGD9/Oc/n/bs2VO8UmDC1nxXr15FyCJkEbLUADVADVAD1AA1QA00roFSIWuPSo8cOZJ2796dba+88krxlLXul73siay9T/vzn/88ffGLX0y7du1Kn/nMZ9JnP/vZIq/ZLJcJ2rrXFPgXzez+RQNb2FID1AA1QA1QA9RA32qgUsj+6le/Kl4BsNcAYvvNb37TWMja09tjx46lL33pS+mee+4pROznPve5dO+996Yvf/nLyXLZL3whZPkB6tsPEOelZqkBaoAaoAaoge5qoFLI2i9m2f/bP9fsHdqmrxbYawMWb+/EmmC9884709133128umA28/GObHdFwA8g7KkBaoAaoAaoAWqgjzVQKWTLftHL7Nv5ZS97vYBf9uIHpo8/MJyZuqUGqAFqgBqgBuanBrJC1v78lj1tNbFa1uSve0fW/vzWjRs3xnnsCeyrr75avE5gT2IliO1JLX9+a34Kgx9S7gU1QA1QA9QANUANzHsNZIWsfWOXvVZgYrWqmQi1b+6qukgTxfaFCPbqgL1iYM1+scua5uazmIMHD1bmqtoHHz9s1AA1QA1QA9QANUANLFcNZIWsPWU1UWl9WbNv4TIRW/cU1X6By2Ktr2q2X10uinO5ipP7zf2mBqgBaoAaoAaogaoayArZqgX4KChqgBqgBqgBaoAaoAaogXmoAYQsf3SY1zmoAWqAGqAGqAFqgBroZQ0gZCncXhbuPPwrkDPwNIIaoAaoAWqAGui2BhCyCFmELDVADVAD1AA1QA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AEINBLAgjZXt42Dg0BCEAAAhCAAAQggJClBiAAAQhAAAIQgAAEekkAIdvL28ahIQABCEAAAhCAAAQQstQABCAAAQhAAAIQgEAvCSBke3nbODQEIAABCEAAAhCAAEKWGoAABCAAAQhAAAIQ6CUBhGwvbxuHhgAEIAABCEAAAhBAyFIDEIAABCAAAQhAAAK9JICQ7eVt49AQgAAEIAABCEAAAghZagACEIAABCAAAQhAoJcEELK9vG0cGgIQgAAEIAABCEAAIUsNQAACEIAABCAAAQj0kgBCtpe3jUNDAAIQgAAEIAABCCBkqQEIQAACEIAABCAAgV4SQMj28rZxaAhAAAIQgAAEIAABhCw1AAEIQAACEIAABCDQSwII2V7eNg4NAQhAAAIQgAAEIICQpQYgAAEIQAACEIAABHpJACHby9vGoSEAAQhAAAIQgAAEELLUAAQgAAEIQAACEIBALwkgZHt52zg0BCAAAQhAAAIQgABClhqAAAQgAAEIQAACEOglAYRsL28bh4YABCAAAQhAAAIQQMhSAxCAAAQgAAEIQAACvSSAkO3lbePQEIAABCAAAQhAAAIIWWoAAhCAAAQgAAEIQKCXBBCyvbxtHBoCEIAABCAAAQhAACFLDUAAAhCAAAQgAAEI9JIAQraXt41DQwACEIAABCAAAQggZKkBCEAAAhCAAAQgAIFeEkDI9vK2cWgIQAACEIAABCAAAYQsNQABCEAAAhCAAAQg0EsCCNle3jYODQEIQAACEIAABCCAkKUGIAABCEAAAhCAAAR6SQAh28vbxqEhAAEIQAACEIAABBCy1AAEIAABCEAAAhCAQC8JIGR7eds4NAQgAAEIQAACEIDA/wdunHkm1/iV+wAAAABJRU5ErkJggg==[/image]
     
    The maximum clock Speed is 50.000Hz where I was using 400.000Hz, Does it means I need to connect an external timer???
    Is it possible to use old Harmony peripheral libraries? Are there many incompatibilities?
    If there's a bug on those PICs, Why there's an i2c eeprom example? Is that meant to not work?
     
    I'm getting lost with something really simple...
     
     
    post edited by amg - 2020/06/03 07:52:45
    #7
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/03 08:14:18 (permalink)
    0
    Definetly old libraries aren't compatible straight forward, functions like PLIB_I2C_BaudRateSet, PLIB_I2C_StopInIdleDisable... doesn't exist anymore in newer Harmony versions...
    #8
    Paul PortSol
    Super Member
    • Total Posts : 630
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: DRV_I2C address 2020/06/03 08:15:00 (permalink)
    0
    All PICs and many other MCU ICs - Always get the errata when you get the datasheet to see if any of the points affect you, errata is updated when silicon issues found.
     
    "Bit Bang" is a code implementation of I2C on the regular I2C pins to bypass a bug in the PIC32MZ silicon, the bug doesn't always occur, but read the errata before ignoring it.
     
    Look up "Big Bang" on wikipedia.
     
    There is a note in Errata about maximum clock rate for I2C, or possibly for the BitBang depending on your SysClk speed. The PIC outputs the I2C clock, so changing between 50KHz and 400KHz is just a setting in Harmony config. Again - READ the ERRATA before doing anything else, no further input till you do that.
     
    I don't use Harmony3, you'll have to dig in the Harmony3 docs to see what to do. This is just a warning about known PIC32MZ I2C issue and that code exists can patch/bypass it.
    #9
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/03 08:47:52 (permalink)
    0
    I have read the errata file and according to the year my revision is affected to those problems:
    Board: PIC32MZ Ethernet and USB Starter Kit
    DM320006
    Stickers says inspected December 26, 2013
     
    But same starter kit board, same project was working using Harmony V1.06, I'm just updating the modules to use Harmony3 and now I meet an errata on the I2C¿?... If the error is on the IC, Why was successfully working with speeds of 400Khz a few years ago with V1.06?
     
    That change on the clock speed that you were talking about in Harmony is what is limited, it only accepts 50.000Hz.
     
     
    post edited by amg - 2020/06/03 09:22:09
    #10
    Paul PortSol
    Super Member
    • Total Posts : 630
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: DRV_I2C address 2020/06/03 10:06:08 (permalink)
    0
    The BitBang option was available for Harmony1.06 and Harmony2. It bypassed the silicon issue.
    You would have to check the MHC settings to see if bitbang was used.
     
    This is an errata of the PIC IC, not the demo board. You would have to get the silicon rev from the PIC on the demo board, not the date of the board (board could have older PIC).
     
     
     
    #11
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/04 04:07:06 (permalink)
    0
    Hi again,
     
    According to errata document from PIC32MZ(EF):
     
    "Indeterminate I2C module behavior may result when data rates > 100 kHz and/or continuous sequential data transfers > 500 bytes are used."
     
    So with clock rates of 100kHz, and read/write operations of 20bytes each (repeatidly every 10ms, as it's the sample period of a sensors device) it shouldn't be inside errata conditions and therefore wouldn't need the BitBang library, Am I wrong?
     
    Having a look on the 4 upper bits <31:38> from the DEVID register the value is "0001", so that should be the rev 1 (or at least is what I read in another post), and only the rev B2 is not affected.
    post edited by amg - 2020/06/04 04:11:49
    #12
    amg
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2014/02/15 11:19:58
    • Location: 0
    • Status: offline
    Re: DRV_I2C address 2020/06/04 12:08:49 (permalink)
    0
    Hi again,
     
    I have successfully implemented the I2C communication without the Harmony driver, just writing and reading the I2C2 registers. I imagine if the only way to skip the errata is BitBanging means that I2C dedicated hardware is somehow not well and therefore my problem remains there waiting until I increase the clock speed over 100kHz and/or increase the data transfers > 500bytes (I guess it means 500bytes in burst mode). At the moment that would fit for me.
     
    Thanks for all!
    #13
    Jump to:
    © 2020 APG vNext Commercial Version 4.5