# 290 questions

Tagged
• x
52
views
1
vote
1

## TWI stops working inside FreeRTOS task

I modified TWI_SENSOR_PCA10040 example from 14.10 SDK to run on my NRF52832 device, and it reads from the device address perfectly. However when I wrap reading inside a FreeRTOS task I keep only getting NRF_DRV_TWI_EVT_ADDRESS_NACK events. I've modified ... (more)

36
views
no
1

## Why isn't nrf_drv_twi_xfer() working configured like this?

Hello,

I am using NRF52 TWI master to read data from my sensor, I have read the twi_sensor example but it doesn't make use of nrf_drv_twi_xfer().

My question is quite straightforward, I have noticed that my settings to use ... (more)

29
views
1
vote
1

## TWI Stuck in nrf_twim_event_check using peripheral sensor.

Greetings, we're currently working in an application where we need to connect different peripherals to a nrf52832 for a wearable device. Each of these peripherals uses a different communication protocol, we are using the following peripherals with the respective ... (more)

16
views
no
no

## Help with using TWI with the NRF52832 (SES studio)

Hi everyone,

So I've this arduino code that utilizes the I2C library and made some convertions to it to work with the nrf52832 in the segger embedded studio and when debugging the code never passes the "err_code = nrf_drv_twi_tx();"

function ... (more)

44
views
1
vote
2

## TWI: P0.30(SCL) and P0.31 (SDA) I2C with nRF52832

Hi,

I'd just start developping with the nRF52832 and I would like to communicate with a sensor using the I2C protocol. Has I am a stranger with the nordic uC, I would like to know if I can choose ... (more)

27
views
3
1

## How can I use ERR_TO_STR_TWI() macro?

Hello,

I would like to understand how can I make use of the macro ERR_TO_STR_TWI in order to know what error is being given by my TWI module function.

I have tried something like this

  err_code = nrf_drv_twi_rx(&twi, reg_addr, rxData ...
(more)

39
views
1
vote
no

## TWI SCL clock irregularity

I'm noticing some irregularity on the SCL line coming from my Nordic 52832. I've attached a Saleae logic trace here. What are the potential causes for this type of behavior?

ST54_init_I2C_trace.logicdata

857
views
no
2

## nRF51 DK mbed I2C/TWI

Hi,

I'm currently building a BLE multi-sensors device, with mbed online IDE. I succeed in implementing BLE API, and releasing a first .hex firmware with multiple services and characteristics.

Now, I want to replace my fake characteristic values by ... (more)

50
views
1
vote
1

## aborting nrf_twi_mngr_perform

It seems like there is the possibility of an infinite loop in the function nrf_twi_mngr_perform() near line 361 where it calls the user function. If the I2C bus is messed up somewhow (e.g. TWI module is in suspend), we ... (more)

91
views
1
vote
1

## TWI easy DMA parallel channels

Hi,

assuming I have an IMU sensor with 3 different interrupt lines. And I want to start a TWI DMA transfer for each interrupt line in parallel. Is this possible since there is only one memory? This would mean to ... (more)

85
views
no
no

## SPI configuration on nRF52832

Hi, Dear Nordic experts:

I encountered with a couple of queer issue while configuring SPI port on nRF52832 with PCA10040 demo board. Here I wrap up as below:

1) First, I tried to enable both TWI0 (master) and SPI0 based ... (more)

50
views
no
no

## TWI easy DMA with uneven RX buffer width

Hi,

I just tried the example from

https://github.com/Martinsbl/nrf5-mpu...

And they are working like a charm. Now I want to change the example to a version where I can read 4 times the gyro via DMA and ... (more)

104
views
no
1

## I2C Auto suspend / resume

Hi, I have an inter-processor communication using I2C working well with the NRF51, the NRF51 performs a read as a master from the other micro ( slave ) which returns a packet with a minimum length of 2 bytes where the first ... (more)

85
views
no
2

## NR52832 I2C problem

Hi ,

I evaluate the I2c communication of your chip nrf52832. I have few problem.

1. Write fonction

uint8_t reg[2] = {CCS811_REG_MODE, NORMAL_MODE};
err_code = nrf_drv_twi_tx(&m_twi, CCS811_ADDR, reg, sizeof(reg), false);


Whatever the configuration I can not ... (more)

101
views
no
1

## Issue running TWI/SPI on nRF52832, works with Kiel but not GCC

Hi,

Just curious to know if anyone else had this issue and how they solved it.

My colleagues and I are working on code based on the Nordic Uart Service, in SDK13.1.0 with SD132v4.0.2 on an ... (more)

362
views
no
1

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

325
views
2
2

## Error when using c++ with TWI

I am trying to use gcc to compile a c++ code for nRF52. I am using the TWI library and am getting the error below. Can anyone help me rewriting this macro so that it compiles normally ?

Compiling file: main ...
(more)

99
views
no
no

## Read register issue using nrf52 TWI

Hi ,

I have recently bought a nRF5232 PCA10040 development kit and i am trying to interface nRf52832 development kit(Master) with AS3955(slave) over twi. I tested the twi_scanner example and AS3955 responds with correct slave address(i.e 0x50 ... (more)

55
views
no
no

## Intersection of PDM Module with TWI Module

Dear Nordic team,

I have a running NRF52 with a firmware based on the freeRTOS demo. To this demo I added the PDM Support Module and the TWI Module. As soon as both sensors are available, I get very random ... (more)

104
views
3
1

## TIMER_TASKS_START increases power consumption when TWI is in use from 13uA to 450uA

Hi, i would like to implement a very low power counter and used the template from this post. I've modified the example and used TIMER2 in counter mode triggered by LPCOMP through PPI. This worked fine and results in ... (more)

113
views
no
1

## TWI and 11-bit I2C slave address devices

Hi. We are attempting to use the Infineon XMC1202 LED shield with our NRF52 device. The XMC1202 has an I2C address of 0x15E, instead of the traditional 7 bit address. We have been using the simple non-blocking TWI implementation to ... (more)

163
views
2
2

## nRF52832 NRF_ERROR_BUSY from nrf_drv_twi_tx()

i used aplication twi_sensor form nRF5_SDK_12.3.0_d7731ad and i use s132.i conected mpu9060 every time get error on my terminl NRF_ERROR_BUSY.There is exemle of codemain.c and scren from terminal d324ssa42d3434234.png what i do wrong ... (more)

64
views
no
no

## Issue using NRF_DRV_TWI_XFER_DESC_TXRX TWI master driver

At the very end of this post from Nordic Info center I am doing the exact example at the very end.

http://infocenter.nordicsemi.com/inde...

This is the start to do a transmit read transaction ===>

nrf_drv_twi_xfer_desc_t xfer = NRF_DRV_TWI_XFER_DESC_TXRX(addr ...
(more)

67
views
no
no

## Application crash after disconnection

Hi,

I have an application with an accelerometer. This one communicate in I2C (TWI ). The accelerometer send a "data ready" signal every 20ms. I'm using the GPIOTE module to detect this signal and read the acceleration (I2C).

Each time ... (more)

183
views
no
no

## nRF52 spurious resets with SDK12.2.0 - How to resolve?

Hello,

we have developed a solar powered LED module with an additional battery. It is based on the nrf52832. The WDT and TWI is mainly used and for BLE the soft device is applied. From time to time, the NRF ... (more)

603
views
no
3

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

619
views
no
3

## TWI clock pull up

The data sheet recommends that both the TWI clock and data lines use pull ups and the GPIOs should be set to S0D1, essentially open collector drive. I can see the need for this on the data line, but if ... (more)

98
views
no
no

## TWI crashes nRF51822 with s130

Hello!

I'm using SDK 12.3.0 with nRF51822. Unfortunately since the begining I've got a problem with TWI interface. It keeps crushing my app. For no reason. At the beginning I was using a FreeRTOS. I did ... (more)

60
views
no
no

## Getting unexpected NRF_ERROR_BUSY return from nrf_drv_twi_tx() which never clears on nRF52832

I have an application which uses the S132 softdevice and communicates with a DAC over I2C. The twi is in non-blocking mode. Furthermore, there is a significant delay between nrf_drv_twi_tx calls which should allow the first transfer to complete before ... (more)

61
views
no
no

## TWI blocks after send receive sequences

Hello

I am using a custom board, based on nRF52832 CIAAB0. I have also S132 installed, and I am using SDK 13.1.0. TWI pins are P0.16 - SCL & P0.18 - SDA. The code is based on twi_sensor example ... (more)

#### Statistics

• Total users: 25629
• Latest user: Mercedes Simonetti
• Resolved questions: 11238
• Total questions: 27730

## Recent blog posts

• ### Introduce smart motion controller - ELIO

Posted 2017-12-12 05:09:05 by caram5555
• ### The world's smallest breakout board compatible BTLE module: Automate your curtains for less than \$90 with BluChip!

Posted 2017-12-07 09:10:36 by Jeevan Anga
• ### Join Jumper's free beta for a Virtual nRF52832 device to streamline your R&D process

Posted 2017-11-27 12:53:04 by Yaniv Nis
• ### PSG-NORDIC Channel in YouTube

Posted 2017-11-27 11:08:04 by Mugelan
• ### Job Offer: nRF / Embedded Developer in Stuttgart, Germany

Posted 2017-11-20 11:46:20 by Marius Heil

## Recent questions

Posted 2017-12-12 10:03:07 by roger.k
• ### system_info.h: No such file or directory what can i do?

Posted 2017-12-12 09:52:43 by AMER