AnsweredAssumed Answered

Problems communicating with the PCF85363A RTC Device?

Question asked by Ronan O'Driscoll on Sep 6, 2018
Latest reply on Sep 17, 2018 by Aldo Gutierrez

I m trying to talk to the PCF85363A RTC device from NXP. I m using an alternative microcontroller to NXP to communicate over the I2C bus. I m expecting to see an ACK after I send it a simple 7-bit slave address however I m not getting any response back. Basically the slave address is 1010001 (0x51). This address is bitshifted to the left by 1 which is 10100010 (0xA2). When I send this to the the I2C bus i was expecting to see the ACK bit set low but as you can see in the picture the last pulse (in yellow) is unexpected because the ACK bit is detected high. Trying this with the value 0x51 on its own is not getting a response back either? Have I defined the slave address in the correct way? If no, could it be a hardware problem?

 I have attached the code below and the scope grab. 

 

int main (void)
{
    ADI_I2C_DEV_HANDLE hDevice;
    uint16_t slaveID = 0xA2;   //0x51<<1
    uint32_t secReg = 0x00;

    /* the "usable" buffers within the overallocated buffers housing the guard data */
    uint8_t myBuf[128];
    uint16_t buf_size = 128;

    uint16_t bytesRemaining, bytecount;
    SystemInit();
    test_Init();

    SetSystemClockDivider(ADI_SYS_CLOCK_PCLK, 16);
    SetSystemClockDivider(ADI_SYS_CLOCK_CORE, 16);

    adi_I2C_MasterInit(ADI_I2C_DEVID_0, &hDevice);
    adi_I2C_RegisterCallback(hDevice, cbHandler, hDevice);
    adi_initpinmux();
    adi_I2C_SetMasterClock(hDevice, MASTER_CLOCK);
    adi_I2C_SetBlockingMode(hDevice, false);

    adi_I2C_MasterTransmit(hDevice, slaveID, secReg, 4, myBuf, buf_size, false);

    adi_I2C_UnInit(hDevice);
}

Outcomes