# 230 questions

Tagged
• x
37
views
1
vote
1

## [nrf51-dk] Can I use both twi instances as well as an SPI instance?

I have a project where I need both TWI instances as well as an SPI instance to be used with sdcard and fatfs libraries. When I try to compile I get the error: SPI1_TWI1_IRQHandler if I have SPI1_ENABLED or SPI0_TWI0_IRQHandler ... (more)

41
views
2
1

## Always getting NCK.

Hi,

I'm trying to control LSM6DS3 by TWI communication. Slave address of the chip is 0xD4 when SDO/SA0 pin is low.

I'm using SDK13.0.0.

My code is like below.

ret_code_t err_code;

uint8_t flag=0;
uint8_t ...
(more)

64
views
no
no

## TWI Infinate Loop

I asked the following question, TWI Stuck Bus Recovery, last week and got a great answer which I implemented. I tested my implementation by changing the device addresses to see if my system could detect the problem, report it and ... (more)

27
views
1
vote
1

## TWI SCL and SDA pins 7 and 6 not working on NRF52

Hello,

I built a simple I2C application for the LMP91000 and I was successfully able to configure it to read the status register.

However, I tested to see if I could use pin 6 and 7 for SCL and SDA ... (more)

52
views
-2
1

## Sending Char Data via BLE w/MPU6050-nRF51822

EDIT: I used a workaround to get my project working but my question still remains. I just used the template project to send data to my app and manipulated the received data inside the app. I must say I was ...

(more)

48
views
no
no

## TWI: prevent repeated start between non stop transfer

Hi,

I am debugging an SSD1306 OLED library, and in the datasheet, it does not explicitly mention support for repeated start bits. But using the nrf_drv_ API's with NRF_DRV_TWI_FLAG_TX_NO_STOP flag set, the successive nrf_drv_twi_tx or nrf_drv_twi_xfer function starts sending ... (more)

20
views
1
vote
1

## TWIS Slave and TWI Master mode drivers Example

I am working through the TWIS Slave and TWI Master mode drivers Example using SDK 12 with the nRF52832 PCA10040 board and having issues. I am using Minicom through the terminal on a Mac to talk to the board. After ... (more)

51
views
1
vote
1

## TWI Stuck Bus Recovery

What is the best method for attempting to recover from a stuck TWI bus after init?

I am currently initializing the TWI instance with .clear_bus_init=true but this only happens once during the init.

For example in the past we ... (more)

33
views
no
2

## nrf51 TWI burst write error [closed]

Hi everybody,

Chip: nRF51422

Board: PCA10028

Firmware: S130_nRF51_2.0.1

The system hangs when doing burst write reg. MPU9255 can work fine if all writes are [reg, data[0]]; How to solve the problem?

uint32_t i2c_write(unsigned char addr, unsigned ...
(more)

42
views
no
1

## Errors Combining examples twi_sensor and ble_app_uart

Hello,

I am using SDK 11.0.0 and attempting to integrate the BNO055 IMU into twi_sensor example and then connecting the IMU data over BLE via ble_app_uart.

I successfully integrated the BNO055 IMU into the twi_sensor example by replacing ... (more)

38
views
1
vote
1

## Port Arduino I2C code with nrf TWI Driver

I am in the process of porting arduino library VL53LX01 to the nrf51822 using nrf_drv_twi functions. I will use this with S130 and thinking of using blocking mode.

I initialized without giving interrupt handler and hope it will run on ... (more)

270
views
1
vote
2

## TWI Driver and SVC Handler Missing Error

Hello,

I seem to be having some errors with my current project. I am using SoftDevice S310 Version 3.0 and SDK 9.0. When i try to communicate with one of my I2C sensors I get an SVC Handler ... (more)

77
views
2
2

## nRF51 MPU9255 TWI/I2C READ Failed [closed]

Hi all:

I used code from Github to read 9 axis data with TWI. But the example in TWI floder doesn't work.

Does somebody have the same issue?

Chip: nRF51422

Board: PCA10028

Firmware: S130_nRF51_2.0.1

I have checked ... (more)

44
views
no
2

Hi, I am using TWI on a 52832 (sdk12.2) and am having problems with reading data. The slave chip that can take up to 60uS (8 bus clock cycles) between to set up data after receiving the address of ... (more)

20
views
no
no

## TWI without SoftDevice [closed]

Hi,

I just switch to Embbeded Studio following the last tutorial (here).

I'm working on NRF51822 with SDK12 and TWI_sensor example (without SoftDevice). I followed the tutorial to import Keil project.I can compile my project without problem.

When ... (more)

64
views
1
vote
1

## nrf52 as TWIS (I2C slave) [closed]

Hi.

I'm trying to use nRF52 as TWI slave.

So far done:

• Enabled TWIS0 from nrf_drv_cfg.h

/* TWIS */

#define TWIS0_ENABLED 1

#if (TWIS0_ENABLED == 1)
#define TWIS0_CONFIG_ADDR1        0 /* 0: Disabled */
#define TWIS0_CONFIG_SCL          0
#define TWIS0_CONFIG_SDA          1
#define ...
(more)

68
views
no
1

Hello,

I've connected an ADXL345 accelerometer sensor via I2C to nrf52 board. I connected SDA > SDA, SCL > SCL, GND > GND and VCC > VDD (3.3V). Here's my code:

    twi_init();

do {
err_code = nrf_drv_twi_rx(&m_twi, 0x53, &sample_data, sizeof(sample_data));

if ...
(more)

40
views
no
1

## nrf_drv_twi doesnt read multiple bytes in SDK 12.2

I am trying to use the function or any function with my BLE UART application. I have a timer that expires to kickoff reading of some sensors and then when I try to read my sensor it only writes the ... (more)

132
views
1
vote
1

## How can I debug a system which is using softdevice S130 in BLE uart application? [closed]

I want to be able to read my i2c and program logic flow within the BLE application but when I try to set breakpoints it causes the cpu to do a hard reset. How can I capture the assert condition ... (more)

81
views
no
1

## Power consumption for nrf52 with TWI & GPIOTE [closed]

Hi,

I have an issue about power consumption with a board nrf52 10040. The consumption should be 100µA but is 500µA. I found an errata about that in 'http://infocenter.nordicsemi.com/pdf/nRF52832_Engineering_C_Errata_v1.5.pdf' (3.27).

I tried ... (more)

53
views
no
1

## Not in changelist - change to nrf_drv_timer.c in SDK 13.0.0

Not a question - but information for anyone similarly caught out.

In SDK 13.0.0 nrf_drv_timer_init() the p_config parameter must not be NULL. In SDK 12.2.0 and earlier NULL gave a default config.

Somehow my timer code, brought ... (more)

27
views
no
1

## Read/ write in twi- nrf51822

<Newbie> Hi, Can anybody give me an example about read/ write in twi- nrf51822 ?

I have slave address is 0x1B and i wanna read a register in it. Thank you !

134
views
4
1

## How can I reuse this library into TWI library in nrF52?

Hello all,

They both make use of either SPI or ... (more)

90
views
no
no

## Undefined reference to `nrf_log_init(unsigned int (*)())' with TWI and C++

HEllo

I am using the example TWI_sensor_pca10040 with a main.cpp, and I see that there is some sort of error with the logging that I cannot point out. I get this error

(more)

83
views
1
vote
no

## How to use Adafruit sensors with nrf52 through TWI/I2C?

Hello,

I would like to make use of an Adafruit sensor Adafruit_TSL2591 connected to my nrf52 through the TWI interface. I have seen the example TWI master device, in that example the sensor is addressed directly, however this adafruit sensor ... (more)

138
views
no
no

## Reading and Writing to Registers using nrf52 TWI

I am building a project which requires accelerometer data from the LIS3DH accelerometer be read and then transmitted over bluetooth. I have successfully setup bluetooth transmission, and the read function for reading from the accelerometer registers. However, I seem unable ... (more)

92
views
no
1

## nrf52 i2c initialization

hello,

According to the "twi_scanner" example from the SDK12.2 I don't understand how the respective I2C pins/GPIOs are set up. There is this function that I found "nrf_gpio_cfg()" in the "nrf_gpio.h" but in the example this ... (more)

72
views
no
no

## TWI scanner and sensors

Hello,

I am working with an nRF52 and two sensors using TWI. My code is based on the TWI_sensor example from SDK 12.2. I made an interesting discovery today when trying to get my HRMI board working over TWI ... (more)

91
views
1
vote
1

## Use internal nRF52 pull-up w/ TWIM?

Hi all --

I have a tricky layout "issue" where unfortunately, I've ended up connecting my I2C device to the BlueTooth module on the side of the module where my VDD isn't routed (two-layer board + a solid GND plane ... (more)

172
views
1
vote
1

## app_twi stuck in internal_transaction_in_progress

Hi,

I'm trying to communicate the nrf52832 with a LIS2DH accelerometer and when I'm trying to read 192 (32*6) bytes of data (to empty the entire accelerometer's FIFO) my code gets stuck on the line 367 ... (more)

#### Statistics

• Total users: 18590
• Latest user: Roseann Seale
• Resolved questions: 9213
• Total questions: 21765

## Recent blog posts

Posted 2017-04-11 11:49:17 by Radosław Koppel
• ### Taking a deeper dive into Bluetooth 5

Posted 2017-04-07 14:53:51 by John Leonard
• ### Logging enabled by default in SDK Bluetooth examples

Posted 2017-03-29 11:27:02 by Håvard
• ### Monitor Mode Debugging with J-Link and GDB/Eclipse

Posted 2017-03-29 05:56:12 by Daniel Veilleux
• ### Getting started with Nordic's Secure DFU bootloader, a step by step guide

Posted 2017-03-20 17:13:52 by Hung Bui

## Recent questions

• ### Is it possible to use Nordic SDK with Arduino?

Posted 2017-04-30 13:33:28 by Lola