This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TWI SHORTS not working

Device: nRF51822 Rev G0

SDK: v5.2.0

Code: raw.githubusercontent.com/.../twi_hw_master.c

Basically, the TWI driver which uses PPI channels (sd_ppi_*) works perfectly - however, the driver which utilises the newly fixed (in Rev G0 devices) shortcuts DOES NOT.

I've narrowed down the issue to TWI read transactions only (writes seem to work fine) - see attached screenshot.

Has this new code been tested by Nordic with READ transactions? I only ask as the supplied example (github.com/.../twi-display-5.1.0) only seems to issues writes to the LCD device.

Many thanks.

image description

Parents
  • After some more testing, it seems like TWI SHORTS are indeed non-functional (even though they are supposed to be fixed in Chip Revision G0).

    As a test, I took the latest Nordic code with SHORTS (raw.githubusercontent.com/.../twi_hw_master.c) and replaced all SHORT code with the PPI equivalents and all TWI transactions work fine. Attached: [sd_twi_hw_master.c]

    I believe this requires further investigation by Nordic.

    Also, has anyone successfully got TWI SHORTS working? (i.e. TWI reads)

    EDIT:

    Shortcuts must be disabled before the twi_master_read() function returns.

    Therefore, adding "NRF_TWI1->SHORTS = 0;" right before the function returns true fixes the issue completely!

    (Thanks goes to RK for pointing me in the right direction).

Reply
  • After some more testing, it seems like TWI SHORTS are indeed non-functional (even though they are supposed to be fixed in Chip Revision G0).

    As a test, I took the latest Nordic code with SHORTS (raw.githubusercontent.com/.../twi_hw_master.c) and replaced all SHORT code with the PPI equivalents and all TWI transactions work fine. Attached: [sd_twi_hw_master.c]

    I believe this requires further investigation by Nordic.

    Also, has anyone successfully got TWI SHORTS working? (i.e. TWI reads)

    EDIT:

    Shortcuts must be disabled before the twi_master_read() function returns.

    Therefore, adding "NRF_TWI1->SHORTS = 0;" right before the function returns true fixes the issue completely!

    (Thanks goes to RK for pointing me in the right direction).

Children
No Data
Related