NRF_ERROR_DRV_TWI_ERR_ANACK ?

Dear Members,

I want to use MAX17048 and getting thiis message  :

<error> app: ERROR 33281 [NRF_ERROR_DRV_TWI_ERR_ANACK] at ..\..\..\MAX17048.c:71

void MAX17048_init_i2c(uint32_t scl, uint32_t sda)
{
        _i2caddr = MAX17048_WRITE_ADDR;
        twi_master_init(scl, sda);
}

//Init MAX17048
       MAX17048_init_i2c(MAX17048_CONFIG_SCL_PIN, MAX17048_CONFIG_SDA_PIN);
      MAX17048_write();

TWI code :

 uint8_t buffer[3] = {0xFE,0x54,0x00};
                    
        ret = nrf_drv_twi_tx(&m_twi_master, 0x6C, buffer, sizeof(buffer), false);
              APP_ERROR_CHECK(ret);

I have others I2C Devices, SSD1306 and 24C16 and they are initialized before this chip,

Any clues,

Thanks

Parents
  • Hello,

    Your error indicates that the address is not acknowledged. How have you connected the TWI slaves to the nRF, could you show a diagram or schematic exempt?

    Please try to run the TWI scanner example from the SDK to ensure that the slave devices can be found on the bus, and let me know what your logger says when you run this example.

    Best regards,
    Karl

  • the schematic :


    nfo> app: TWI scanner started.

    nfo> app: TWI device detected at address 0x8.

    nfo> app: TWI device detected at address 0x36.

    nfo> app: TWI device detected at address 0x3C.

    nfo> app: TWI device detected at address 0x50.

    nfo> app: TWI device detected at address 0x51.

    nfo> app: TWI device detected at address 0x52.

    nfo> app: TWI device detected at address 0x53.

    nfo> app: TWI device detected at address 0x54.

    nfo> app: TWI device detected at address 0x55.

    nfo> app: TWI device detected at address 0x56.

    nfo> app: TWI device detected at address 0x57.

    from MAX17048 datasheet,

    The 7-bit slave address
    is fixed to 0x6C (write)/0x6D (read):

    Any clues ? thanks

Reply
  • the schematic :


    nfo> app: TWI scanner started.

    nfo> app: TWI device detected at address 0x8.

    nfo> app: TWI device detected at address 0x36.

    nfo> app: TWI device detected at address 0x3C.

    nfo> app: TWI device detected at address 0x50.

    nfo> app: TWI device detected at address 0x51.

    nfo> app: TWI device detected at address 0x52.

    nfo> app: TWI device detected at address 0x53.

    nfo> app: TWI device detected at address 0x54.

    nfo> app: TWI device detected at address 0x55.

    nfo> app: TWI device detected at address 0x56.

    nfo> app: TWI device detected at address 0x57.

    from MAX17048 datasheet,

    The 7-bit slave address
    is fixed to 0x6C (write)/0x6D (read):

    Any clues ? thanks

Children
No Data
Related