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

No TWI connection with s100, Dev Kit and BLE

Dear all,

I'm trying to connect the NRF51-DK (PCA10028) with a LSM330DLC accelerometer over TWI (I2C). I'm using the ble_app_uart example, included the twi_master.h file and selected the twi_master (software) in the Run-Time environment.

I call twi_master_init() in the main function. I used the i2c.c wrapper I found here on the forum and using its readI2cReg i'm trying to read a register from the LSM330DLC in order to verify the connection. However, the first twi_master_transfer function returns false, indicating that no data was transferred successfully. I get no further errors and the UART demo still works correctly while running the application.

Can someone please point me in the right direction? Without a clear error I find it very difficult to look in the right place. I added the KEIL5 folder to the post if someone wants to check out the files: ble_app_uart.zip

Related