Configuring NRF NFC as I2C

I am having trouble reconfiguring NFC pins on NRF devices as an I2C interface. Following the I2C example (from here), I was able to communicate with an I2C device on the nrf52dk, and I was able to change the pins in pinctrl.dtsi to modify which pins were used for I2C. When I change to pins P0.09 and P0.10, the NFC pins, and adjust hardware accordingly, the write-read command to check the "WHO-AM-I" register fails with a negative return value. I am looking for a solution as my custom board, built off the NRF52833-QDAA chip, currently has I2C hardwired to P0.09 and P0.10. as I didn't realize there would be configuration issues. 

Most questions on here point to the configuration "CONFIG_NFCT_PINS_AS_GPIOS" which is deprecated - I included "nfct-pins-as-gpios;" in &uicr in the devicetree file.

Test device is an MPU 6050, same issue on the custom board with a ICM 42688.

nrf52dk: PCA10040 3.0.0
NRF Toolchain/Connect SDK 2.6.0 
VS Code on Windows 10

Parents
  • Okay, one thing we might have missed. To use the P0.09 and P0.10 as GPIOs on the nRF52832 DK, you will need to change the following on the DK itself: R25 and R26 must be not connected (NC) and R27 and R28 must be shorted with an OR resistor. By default, this is inversed, so moving the resistors on R25 and R26 to R27 and R28 should be sufficient. The other thing I can think of is that you need to do a pristine build after making changes to overlay files/configs in your NCS application.

    Best regards,

    Simon

Reply
  • Okay, one thing we might have missed. To use the P0.09 and P0.10 as GPIOs on the nRF52832 DK, you will need to change the following on the DK itself: R25 and R26 must be not connected (NC) and R27 and R28 must be shorted with an OR resistor. By default, this is inversed, so moving the resistors on R25 and R26 to R27 and R28 should be sufficient. The other thing I can think of is that you need to do a pristine build after making changes to overlay files/configs in your NCS application.

    Best regards,

    Simon

Children
Related