This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NACK from i2c slave

Hi

i am using twi_hw_master.c for i2c communication of accelerometer.

my accelerometer address is 0x18.

once i call

twi_master_transfer(0x18,dataW,1,1);

in function ERRSRC is setting to 0x02,

means there is no ack from slave.

but first time i got chip id .

is it needed to give delay after data transmittion like

NRF_TWI1->TXD = *data++; TWI_DELAY(); NRF_TWI1->TASKS_STARTTX =1 ;

or not needed . and i check with all 3 twi frequency,but not worked.

kindly suggest me.

Regards Balaji

Parents
  • Hi Balaji

    for trouble shooting you've two options

    (1) I request you to confirm that slave address that you have given is correct, in the examples in SDK the slave address used is as "7bit slave address + R/W bit " so please ensure that you've followed the format correctly.

    (2) Check the whether the slave is producing a ACK (low) after the 8bit data has been sent using a "CRO" . If it shows that a NACK (high) , I suppose that there is a issue with your sensor module's hardware

    Regards HP

Reply
  • Hi Balaji

    for trouble shooting you've two options

    (1) I request you to confirm that slave address that you have given is correct, in the examples in SDK the slave address used is as "7bit slave address + R/W bit " so please ensure that you've followed the format correctly.

    (2) Check the whether the slave is producing a ACK (low) after the 8bit data has been sent using a "CRO" . If it shows that a NACK (high) , I suppose that there is a issue with your sensor module's hardware

    Regards HP

Children
No Data
Related