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

how to read slave address in iic(twi)

hello, i am using nrf52 dk .I was testing example twi scanner.I want to read slave address.So i am using twi scanner example but i got error message as follow:

TWI:INFO:Transfer type: XFER_RX. TWI:INFO:Transfer buffers length: primary: 1, secondary: 0. TWI:WARNING:Function: nrf_drv_twi_xfer, error code: NRF_ERROR_DRV_TWI_ERR_ANACK.

can any help me to resolve the issue

Parents
  • From the documentation of the TWI driver, the following described the error NRF_ERROR_DRV_TWI_ERR_ANACK: If NACK received after sending the address in polling mode. If s NACK (no ACK) is received when the address is sent, this error is thrown. This typically happens if there is an error in the connection or the slave device is not powered. Have you checked the SCL and SDA lines with a logic analyzer, to see if there is anything happening on the bus?

Reply
  • From the documentation of the TWI driver, the following described the error NRF_ERROR_DRV_TWI_ERR_ANACK: If NACK received after sending the address in polling mode. If s NACK (no ACK) is received when the address is sent, this error is thrown. This typically happens if there is an error in the connection or the slave device is not powered. Have you checked the SCL and SDA lines with a logic analyzer, to see if there is anything happening on the bus?

Children
No Data
Related