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

TWI on nRF51 DK (nRf51422) with s110

image descriptionHi all,

I'm trying to get TWI working on the nRF51 DK but it's not working. I used the twi_hw_master_sd.c file so softdevice use should not be a problem. When I debug the code it gets stuck at the twi_master_transfer(0x58,dataW,2,true); line

I'm using pin 18 and 19 as specified in the config file ( 24U and 25U). I checked the pins with an oscilloscope but it seems no clock or data signal is found. Both pins do stay 'high' all the time tho. Also the device stays advertising all the time so thats not the problem. Furthermore the TWI device which i'm trying to communicatie with does send ACK according to the datasheet(see picture)

Maybe i'm doing something wrong or should I add some code about using the softdevice? I really need to get this working asap as with an arduino it only took 1 hour..

Thanks!

Related