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

TWI sending address with no data

I need to send the following sequence of bits through TWI

start bit | 7 bit address | write | slave ACK | stop bit

I looked through the twi_hw_master.c and it seems that when you issue the TASKS_STARTTX both the ADDRESS and the TXD would be sent.

How do I manually issue a stop bit right after the slave ACKed the address?

  • @Red Shaya: You are correct. Our hardware TWI wouldn't support transferring just ADDR without any payload. As you can find there is no EVENT back after the first ACK in the Figure 64 in the nRF51 Reference Manual.

    I would suggest you to use the software TWI library and modify it to match with your need. The twi_sw_master.c can be found at \components\drivers_nrf\twi_master\incubated in the SDK.

  • Hi,

    I have a pretty similar issue. I'm using the si7210 Hall effect sensor from Silicon Labs. To wake the chip, a TWI frame like the one described above must be sent and nothing else. I looked for the software TWI library suggested bu Hung Bui but as it was 4 years ago and I'm using the SDK version 15, it is now indicated as deprecated. 

    Any new idea/solution for this issue.
    Thanks a lot.

Related