I am interfacing nRF52840 DK with the MAX30101 sensor. I am able to execute all the TWI transactions necessary by using port 0 pin 27 as SCL and port 0 pin 26 as SDA.
However when i use port 0 pin 14 as SCL and port 0 pin 13 as SDA I am not getting any output. I used ble_app_uart example and added TWI drivers. Are pins 14 and 13 assigned to something else in the ble_app_uart example?
Changing pins is not an option, please tell me how I can go about working TWI on these pins.
If i perform twi_init before bsp_buttons_leds function then TWI is working. But if i place it after it does not.
P0.13 and P0.14 are connected to LED1 and LED2 on the nRF52840 DK, respectively, see here. You will need to find unused pins, or adapt the DK to work for your purposes. This would of course not be a problem in a custom PCB design.
yes, What changes should I make to the ble_app_uart example (SDK15.2) to get this working?
You could either change the pins used in the ble_app_uart example to unused pins or make changes to the DK.
If you don't need LED1 and LED2 and prefer to use P0.13 and P0.14, you can disconnect the LEDs by cutting the solder bridge(Have a look at this).
I would like to disable the LEDs and BUTTONS on the ble_app_uart example. There seems to be some dependency with the leds and buttons with the ble functions. Could you tell me how i can remove these dependencies?
You should be able to do that if you don't initialize the buttons and lEDs. Remove buttons_leds_init(&erase_bonds) from main.