# 42 questions

Tagged
• x
11
views
no
no

## want to write and read data to/from Flash?

I want to add some configuration files to nrf52, so can I write data in flash and read when I want.......I have the example code of twi master_twi slave but it engages the pin so I need a separate ... (more)

38
views
no
no

## I am running MCP9808 on NRF52 EVB, i have this following program which is not giving the correct values on terminal display

I have this program running on KEIL 5, what could be the problem with the code and Do you guys have any sample code for mcp9808? Note- I am using the wired connection not a Bluetooth app to sense the ... (more)

49
views
1
vote
no

## TWI bus freeze after several thousand tx/rx cycles

I'm periodically polling a TWI sensor with a blocking call, as in

ret_code_t err_code;
m_xfer_done = false;

APP_ERROR_CHECK(err_code);
while (m_xfer_done == false) {};

if (err_code == NRF_SUCCESS) {
m_xfer_done = false;
err_code = nrf_drv_twi_rx(&i2c, address, dest, count ...
(more)

68
views
1
vote
1

## Can we connect two I2C(TWI) masters at same time to nrf52?

I am specific about master as I have to connect two simultaneously(obviously to two different pins pair). Plz provide any code outline if you have, Thank you in Advance

33
views
no
no

## No TWI event in NRF52 SD132, SDK11 and FREERTOS

Hi there, I'm porting an app from NRF51 SD130 to NRF52 SD132, both with sdk11. I do the usual stuff, like changing includes, freertos ports libraries, etc, and everything was working... Until TWI.

I'm using twi no DMA ... (more)

134
views
no
1

## Three TWI instances

I noticed that there can be three SPI instances (SPI0, SPI1, SPI2) for the nRF52. Is it possible to have three TWI instances? We have a sensor network that requires 6 of the same type of I2C sensor. If not ... (more)

68
views
1
vote
1

## TWI master blocking mode & non-powered peripheral [closed]

Hello to all nordic jedi masters!

I have made an observation, on which I would like your confirmation. My combo is: nrf52832 + SDK 11 + SD132.

Will my application "hang" if I am operating the TWI master in blocking mode, and ... (more)

71
views
1
vote
1

hello,I am testing twi scanner example of nrf52dk.I want to read slave address, the sda & scl pins are 26 & 27 respectively. I am connected PCA9536 module as slave & address of that module is 0x41.I want to read ... (more)

96
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)

153
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)

127
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)

211
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)

171
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)

144
views
1
vote
1

## nRF52 - TWI and BLE

Hello,

I would like to collect sensor data over TWI and transmit to a smartphone using BLE. I am wondering what the best way to do this would be. I am using SDK 12.2.

So far, I have one ... (more)

123
views
1
vote
1

## Again the TWI0_USE_EASY_DMA error...

Hello, My setup: PCA10040 DK, 12.2 SDK

I copied the "BLE_APP_UART" example into my project folder and want to "upgrade" it with the TWI. So I copied parts of the "twi_scanner" and the "twi_master_using_app_twi" and tried to understand the ... (more)

82
views
no
1

## TWI Driver with general call

I'm trying to interface the twi driver with a ft200xd chip (i2c -> USB serial). I want to read the available bytes, but it requires a general call first see page 29 of http://www.ftdichip.com/Support/Docum...

Is ... (more)

95
views
2
1

## twim (I2C) doesn't send anything

Hy everyone!

I'm trying to write a non-volatile memory position of a device via I2C (twi), the device, a flash memory is the slave.

In my application, I have configure the twi, enable it, then, I send the data ... (more)

129
views
no
1

## Twi configuration for multiple slave devices

Hello,

I'm trying to configure two TWI slave devices on the same TWI bus on my custom board(nRF52832). One slave is RTC, and the other is a biosensor. The TWI configuration for RTC seems to work. So I ... (more)

177
views
no
1

## nrf_drv_twi_tx() return NRF_ERROR_BUSY

Hi,

I am using the following function to read the content of a register:

static ret_code_t read_reg(uint8_t slave_address, uint8_t register_address, uint8_t *value) {
ret_code_t err_code;
VERIFY_SUCCESS(err_code);

err_code = nrf_drv_twi_rx(&m_twi, slave_address, value, 1 ...
(more)

404
views
no
2

## BMD300 I2C/TWI not working

Hi,

I am trying to communicate with MLX90615 (here) sensor using BMD300. nRF52 DK is used to program the device. I am testing with a sample code which detects any I2C compatible device which is connected to SDA and SCL ... (more)

527
views
1
vote
1

## NRF52 + MPU 6050 + I2C

Hi!

I am new to the embedded world and am trying to interface a NRF52 DK with a MPU 6050 accelerator/gyroscope. Right now, I have been able to interface the MPU 6050 with an arduino. Now, I want to ... (more)

203
views
no
no

## repeated start for twi master rx operation

Hi,

I am using nRF52 as a twi mater to read some data from a touch sensor, I want to perform below operation:

twi start

twi rx register_a for few bytes

repeated start

twi rx register_c for few bytes

repeated ... (more)

436
views
no
1

## No activity on TWI Sensor example interface pins

Running the SDK11 example \examples\peripheral\twi_sensor on a NRF52 PCA10040 version dev board and can't get any output from TWI pins. Leaving pins unconnected and using programs default pins or changing them to something else and I get ... (more)

469
views
3
1

## TWI causing nRF52 not to sleep

I am using sd_app_evt_wait() to put my nRF52 to sleep. Works fine except after I read from a TWI sensor. As soon as I do I see the nRF52 continuously jump out of sleep. I have put a log into ... (more)

532
views
2
2

## Does setting a pin to be TWI SCL or SDA enable its pullup?

I have the nRF52 dev kit, and I hooked up pin 13 to SDA and pin 18 to SCL on an I2C device. There are no external pullups on the SDA or SCL lines.

However, the TWIM module appears to ... (more)

327
views
no
1

## TWI Issue With Peripheral Sensors

I'm building some code off of the twi_master_using_app_twi example which is available in the SDK (v11.0.0).

The two peripherals I'm working on are an accelerometer (LIS3DH) and gyroscope (L3GD20H).

I'm able to read and confirm ... (more)

1k
views
no
1

## No NAK reported with TWI driver? [closed]

Using nRF5 SDK v11.0.0, I am working on bringing up new hardware based on the nRF52. I started with code that works on the PCA10040 development board in which we connected an FTDI USB-to-I2C chip. When switching to ... (more)

457
views
3
1

## TWI handler with nrf_drv_twi_tx()

I have created a library for HD44780 Hitachi LCD, and I can transmit data to the LCD through an IO Expander without any problem over TWI lines. Right now I am not using any TWI Handler function for transmitting data ... (more)

275
views
no
2

## using i2c to send 3 command per 10ms, ppi available?

just like https://github.com/Martinsbl/nrf5-mpu... we add a sensor, and try to read 2 sensors by 3 command in i2c. is it possible to still using ppi?

97
views
no
no

## What exactly do nrf_drv_twi_disable() and _enable() do?

I am working with a sensor which has a programmable configuration register. After changing this register, I have to reboot the sensor. To do this, I need to temporarily suspend a TWI master driver and manipulate the SCL and SDA ... (more)

#### Statistics

• Total users: 23170
• Latest user: Andrew Ochs
• Resolved questions: 9878
• Total questions: 23817

## Recent blog posts

• ### Flashing and Debugging nRF51/52 with a cheap blackmagic probe compatible SWD programmer

Posted 2017-07-24 09:32:02 by Mahesh Venkitachalam
• ### Introducing nRF5 SDK for Mesh

Posted 2017-07-20 09:42:44 by Pär H

Posted 2017-07-19 06:53:42 by Mohammad Afaneh
• ### Unique Thread/Bluetooth multiprotocol solution with nRF5 SDK for Thread and nRF52840 SoC by Nordic

Posted 2017-07-14 10:31:56 by Krzysztof Loska
• ### nRF Connect macros (currently Android only)

Posted 2017-07-14 13:29:14 by Aleksander Nowakowski

## Recent questions

• ### Difficulty getting s132 SoftDevice working with UART example (uVision)

Posted 2017-07-26 04:24:31 by Drewster