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

  • Hi. Which TWI driver are you using. I'm afraid that there are a couple of different versions out there. I have attached the TWI hardware driver included in SDK v8 which is supposed to have corrected for PAN 56.

    twi_hw_master.c

  • I don't think that was his question, he didn't want a TWI driver which worked around PAN 56, he was saying that the latest revision 3 chipset was supposed to have fixed PAN 56 in hardware, thus not requiring a driver which worked around the issue because there should no-longer be an issue to work around.

    Does revision 3 hardware still suffer from TWI lockup? The original poster is saying that he's seeing something very like the pre-revision 3 TWI hardware lockup on revision 3 hardware.

  • Hi all,

    RK's comments pretty much covered everything for me (thanks!)

    @Martin, by the way, the .c file you posted is the same as the one I used.

    As mentioned previously, I am curious why the lock up still happens. According to PAN v3.0, this issue should be fixed in hardware in the v3 silicons.

    Thanks, Mike

  • Ah, sorry for the misunderstanding. We haven't had any reports on TWI lockups on rev 3 silicon, so this is new to us and we suspect there might be something going on during dfu.

    • Do you have access to a logic analyzer to show us what is going on on the TWI lines?
    • Can you share your code with us? You can contact us on our MyPage support portal if you prefer some confidentiality.
    • Are you able to debug the code to see if your code hangs somewhere?
    • When you say "the TWI transaction would randomly occur, fairly frequently" do you mean that the lockup randomly occur or is the TWI really going haywire?
  • Mike - if the version of the .c file you're using is the same as the one posted as you say, then the issue you're having cannot be the PAN from the previous silicon revision, that twi driver works around that issue. So you certainly have a problem which may look like the hardware TWI lockup, but it can't be the same thing.

Related