Skip to content

nRF51822: TWI data corruption & TWI hang up sometimes #348

Open
@Shreyas-R

Description

@Shreyas-R

Guys, I'm using the library for one of my projects using generic nRF51822 (v3) module where I'm using BLE peripheral (BLE UART) to send some data through I2C to some external device. I took examples from your library & built my code on that. Now I'm facing two issues:

  1. Sometimes I2C data sent is corrupt
  2. Sometimes I2C data transmission hangs nRF51822 (with SCL or SDA always low)

I did some debug & here is what I found:

  1. I'm sending multiple I2C data bytes after each interval & I found that some clock cycles or some data is not sent over I2C.
  2. Slave has fixed frequency set & clock stretching disabled so it must be caused by master only (especially SCL always low)

After going through some Nordic doc & threads, I found that BLE peripheral has higher priority & can cause issue to TWI.

  1. What & where is the priority of TWI set in the library?
  2. Is DMA enabled for TWI?
  3. Is TWI intialised with blocking or non blocking mode in the library? Where can I change it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions