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

TWIM: NO_STOP on RX

Hi all,

I'm working with a chip that is not really i2c compliant and requires us to not send a STOP at the end of an i2c read/write (I know super crappy but that's all I can work with right now...).

I went ahead and modified twim_xfer() to not short LAST_RX and STOPi in RX and TXRX conditions, but then we continue to clock byte reads until we receive a NACK (and then send a stop).

Is there a way to to stop RX after reading the number of bytes and suspend the RX transaction right away without sending a STOP?

Thanks,

Fabien

Parents
  • Hi Fabien

    Sorry, but what happens (to the peripheral) if you do send the STOP task when you're done reading/writing? According to the documentation, the TWIM won't stop by itself and must be issued, either through the use of a local PPI shortcut or in software as part of the error handler. We don't support not sending the stop task, as that would put the peripheral in the wrong state after an I2C event, so I'm sorry, but if you want serial communication with this device, I think you'll have to do it by bit-banging.

    Best regards,

    Simon

Reply
  • Hi Fabien

    Sorry, but what happens (to the peripheral) if you do send the STOP task when you're done reading/writing? According to the documentation, the TWIM won't stop by itself and must be issued, either through the use of a local PPI shortcut or in software as part of the error handler. We don't support not sending the stop task, as that would put the peripheral in the wrong state after an I2C event, so I'm sorry, but if you want serial communication with this device, I think you'll have to do it by bit-banging.

    Best regards,

    Simon

Children
Related