TWIM restart on address NACK (NRF9160)

Hello,

I trying to interface with a I2C device (specially, ST25DVxxK) that requires a specific I2C start sequence to ensure correct arbitration:

(from ST AN5624).

Is it possible to produce the repeated address sequence? If I understand correctly, I can publish ERROR event to a DPPI channel and subscribe STARTTX/STARTRX to that channel. Would that work, or do I have to involve CPU? Either way, the behavior of ERROR isn't specified explicitly in the specification. Does it trigger SUSPEND or STOP? What state the DMA buffer poiter/counter will end in in case of address NACK?

Also, is it possible to discriminate between ERROR sources? Is TXSTARTED/RXSTARTED generated after address acknowledgement so that it can be used to disable the DPPI channel for used for restarting?

Thank you.

Parents
  • I am not sure if you can stop the transaction midway once it is started. 

    If I understand correctly, I can publish ERROR event to a DPPI channel and subscribe STARTTX/STARTRX to that channel

    This is not legal to do with TWIM as mentioned in the product specification

    After the TWI master is started, the STARTTX or STARTRX tasks should not be triggered again until the TWI master has issued a LASTRX, LASTTX, or STOPPED event.

Reply
  • I am not sure if you can stop the transaction midway once it is started. 

    If I understand correctly, I can publish ERROR event to a DPPI channel and subscribe STARTTX/STARTRX to that channel

    This is not legal to do with TWIM as mentioned in the product specification

    After the TWI master is started, the STARTTX or STARTRX tasks should not be triggered again until the TWI master has issued a LASTRX, LASTTX, or STOPPED event.

Children
No Data
Related