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

TWI Module lock-up still present in nrf51822 v3 [PAN #56]

Hi,

I am currently experiencing TWI module lock-up issues with the hardware TWI library, which is supposedly fixed according to PAN v3.0, issue #56. (The issue was previously identified in PAN v2.3)

My setup is as follows, custom board, SD110v8, NRF51822 QFAAH0 (16kB flash, v3 silicon). My code is modified from the dfu_ble_dual_bank example in the Keil packs. The TWI transaction is triggered every 2s by the app_timer.

If I change the TWI library to software TWI, then the problem disappears.

An interesting note is, before the dfu bootloader starts (prior to the function call of : bootloader_dfu_start ), the module lock up doesnt seem to happen. Once the bootloader fully starts, (after calling bootloader_dfu_start function), the TWI transaction would randomly occur, fairly frequently.

Could someone from Nordic provide some insight to this problem? As my observations seem to contradict the PAN v3.0

Warm regards, Mike

  • I have no real idea because I don't use it - I write all my own library code. That said, 100s of products have been shipped using Nordic's TWI HW library and they appear to work and I'm guessing from the name of the thing you found, tw_hw_master.c, that it's a derivative of, or an earlier version of, the HW library.

    In the end it's hard to see how a HW library could work intermittently, it's hardware, you write the register, the byte is clocked in and/or out, the clock is togged, in hardware. The TWI hardware either works or it doesn't, there's not much you can do to drive it which will make it work differently.

    The only thing I can say about those traces (and I'm spoiled as I have a logic analyser which make life easier) is that the nrf TWI appears to do the right thing but there's no reply from the other chip. I think if you want to get further perhaps file a support case.

  • Hi RK, thanks for the reply as always. At this point we don't have the resource to investigate this further. I will just use the library that is working for us at the moment. Cheers.

Related