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

TWI: prevent repeated start between non stop transfer

Hi,

I am debugging an SSD1306 OLED library, and in the datasheet, it does not explicitly mention support for repeated start bits. But using the nrf_drv_ API's with NRF_DRV_TWI_FLAG_TX_NO_STOP flag set, the successive nrf_drv_twi_tx or nrf_drv_twi_xfer function starts sending data with a start condition.

image description

As shown by the logic analyzer, the Green dot is a start ad red dot is a stop. I dont not want the last green dot to the right. Is this possible using the nrf_drv_twi_ API ?

Parents
  • I just verified that SSD1306 really requires not to have start bits in between. I tried splitting up the data to be sent into smaller chunk with no lone start bits in between and I get correct display as expected. It would be nice to have another flag in the nrf_drv_twi_ API not to put a start bit, just like not putting a stop bit. Why I cannot send the whole data at one go is possibly another issue - if I give smaller data lengths, they work.

Reply
  • I just verified that SSD1306 really requires not to have start bits in between. I tried splitting up the data to be sent into smaller chunk with no lone start bits in between and I get correct display as expected. It would be nice to have another flag in the nrf_drv_twi_ API not to put a start bit, just like not putting a stop bit. Why I cannot send the whole data at one go is possibly another issue - if I give smaller data lengths, they work.

Children
No Data
Related