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

TWI communication issue with nRF52840 Dongle

Dear Nordic Team,

We are working on connecting an I2C device to an nRF52840 Dongle. The code we are using is one we've been developing for a few weeks with an nRF52840 DK with which it works fine. As we're making the transition to the dongle we've incrementally enabled portions of the code (led, button, BLE all work), but the I2C gets stuck: NRF_DRV_TWI_EVT_DONE event never happens after first call of nrf_drv_twi_tx. Previously with the DK if this happened it was always a soldering/connection issue, but it doesn't seem to be the problem here.

Rather, I suspect the GPIO pin configuration is the problem. We've attached snapshots of the code segments where we initialize the TWI and define the GPIO pins. is there any other step specific to the dongle we need to take to resolve the issue?

Thank you in advance,

George

define pins

I2C init and write

HW connections

Parents
  • Hi,

     

    It seems that you're using the NFC pins as TWI SCL/SDA pins (P0.09 and P0.10). You need the preprocessor define "CONFIG_NFCT_PINS_AS_GPIOS" set in order to use those as normal GPIOs, or use any other available GPIOs for this purpose. On development kits (nrf52-DK, nrf52840-DK, etc), you also need to move some zero-ohm resistors to route the signals to the pin header.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    It seems that you're using the NFC pins as TWI SCL/SDA pins (P0.09 and P0.10). You need the preprocessor define "CONFIG_NFCT_PINS_AS_GPIOS" set in order to use those as normal GPIOs, or use any other available GPIOs for this purpose. On development kits (nrf52-DK, nrf52840-DK, etc), you also need to move some zero-ohm resistors to route the signals to the pin header.

     

    Kind regards,

    Håkon

Children
No Data
Related