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

TWI locks on nRF51822 v3

hello,

i am experiencing issues with the TWI library on the smart beacon kit rev. 1.3.0 which features the v3 of the nRF51822. i had the same experience on the new nRF52840(preview devkit) but it is not happening as often there.

doing some research i stumbled upon several issues with the TWI driver/peripheral and also found out that there was indeed a lockup problem which, however, should be fixed with the current silicon revision.

TWI module lockup still present in nrf51822 v3-pan-56

TWI stuck and blocked [closed]

TWI issue ? [closed]

Possible bug: I2C stuck

we're using:

  • nRF5_SDK_12.3.0
  • nRF51822 (Smart Beacon Kit v 1.3.0), latest revision v3
  • nRF52840 (Bluetooth 5 preview kit)

the problem appears in nrf_drv_twi.c, line 561

while (twi_transfer(p_twi, &p_cb->error, &p_cb->bytes_transferred, (uint8_t *)p_data, length, no_stop))
{}

one workaround mentioned in the other issues was to use the DMA mode - which is not available for the nRF51 (at least not in the SDK v12.3). are there any updates on that?

the device we're creating will be under heavy stress (vibrations, movement, etc.) so the I2C should be quite stable -- or at least we should be able to recover from issues w/o a restart (we'd lose the bluetooth connection).

any ideas on how to proceed? i really want to avoid using bit-banging.

Parents
  • I see. Isn't it purely mechanical problem? As far as I see nRF51822 Beacon Kit doesn't have any good PIN header so i suppose you've soldered the sensor right on the PCB pins? Or are there any clumpsy wires hanging around the HW in the air? I could imagine any issue with levels on these lines because of short or dropped voltage from 3V3 pull-ups will kill current transfer.... just random ideas. To be fair I've switched to nRF52 exactly because lack of wired interfaces and weaknesses of the once which nRF51 has (I know, this is now what you want to hear, but maybe a way to save some time i your life?:)

Reply
  • I see. Isn't it purely mechanical problem? As far as I see nRF51822 Beacon Kit doesn't have any good PIN header so i suppose you've soldered the sensor right on the PCB pins? Or are there any clumpsy wires hanging around the HW in the air? I could imagine any issue with levels on these lines because of short or dropped voltage from 3V3 pull-ups will kill current transfer.... just random ideas. To be fair I've switched to nRF52 exactly because lack of wired interfaces and weaknesses of the once which nRF51 has (I know, this is now what you want to hear, but maybe a way to save some time i your life?:)

Children
No Data
Related