<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42454/unable-to-use-twi-on-nrf52840</link><description>Hi 
 
 I am trying to use the TWI on nrf52840 but i am unable to get it to work. its getting stuck somewhere. I dont have a logic analyzer so i am unable to check if the signal are coming or not. I am able to use the I2C with apache mynewt so i dont think</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jan 2019 11:32:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42454/unable-to-use-twi-on-nrf52840" /><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165936?ContentTypeID=1</link><pubDate>Wed, 16 Jan 2019 11:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b035664-69d4-4abf-b4c0-469d7739f61a</guid><dc:creator>awneil</dc:creator><description>[quote userid="74404" url="~/f/nordic-q-a/42454/unable-to-use-twi-on-nrf52840/165853"]im&amp;nbsp; not using a nordic dev kit. Its a custom board[/quote]
&lt;p&gt;It&amp;#39;s always good to have Nordic&amp;nbsp;dev kit as a known-good reference ...&lt;/p&gt;
&lt;p&gt;This applies in general - not just to Nordic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165931?ContentTypeID=1</link><pubDate>Wed, 16 Jan 2019 11:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2112ebd5-667c-4909-9197-7e67da05e117</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked at your code with a logic analyzer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not able to transfer any data with your code, and stepping through the code I can see that the transmit function is called, but it goes into a infinite loop. I think you maybe have some problems with the pin configuration / or that a pin is floating.&lt;/p&gt;
&lt;p&gt;There are a lot of working MPU9250 drivers, can you take a look at how they are configured?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165853?ContentTypeID=1</link><pubDate>Wed, 16 Jan 2019 03:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b3ef0a-83a1-486d-b2c4-e5b905508637</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;I have posted the debugger output above.&lt;/p&gt;
&lt;p&gt;Not really. Just havent gotten to it yet.&lt;/p&gt;
&lt;p&gt;No, im&amp;nbsp; not using a nordic dev kit. Its a custom board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165828?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 18:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a80542e1-71a8-4af8-b859-f096df1f1129</guid><dc:creator>awneil</dc:creator><description>[quote userid="74404" url="~/f/nordic-q-a/42454/unable-to-use-twi-on-nrf52840"] I dont have a logic analyzer[/quote]
&lt;p&gt;and you don&amp;#39; have a debugger, either?&lt;/p&gt;
&lt;p&gt;You really do like to make life hard for yourself!&lt;/p&gt;
&lt;p&gt;Do you have a reason not to use SES ?&lt;/p&gt;
&lt;p&gt;Are you using a Nordic Dev Kit?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165825?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 17:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1664d35d-6218-44fa-a46e-b187f541d9b6</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;I tried by uploading the generated hex file directly and it works. But when i create a zip file using nrfutil for usb-dfu, it shows the &amp;quot;stuck&amp;quot; behaviour i have been describing in this post. Can you please help me out? I am using SDK&amp;nbsp;nRF5_SDK_15.2.0_9412b96 .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I created the zip file using&amp;nbsp;nrfutil pkg generate --debug-mode --hw-version 52 --sd-req 0 --application _build/nrf52840_xxaa.hex trial.zip&lt;/p&gt;
&lt;p&gt;and i am using the open_bootloader example.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;

/* Linker script to configure memory regions. */

SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)

MEMORY
{
  FLASH (rx) : ORIGIN = 0x1000, LENGTH = 0xff000
  RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x40000
}

SECTIONS
{
}

SECTIONS
{
  . = ALIGN(4);
  .mem_section_dummy_ram :
  {
  }
  .log_dynamic_data :
  {
    PROVIDE(__start_log_dynamic_data = .);
    KEEP(*(SORT(.log_dynamic_data*)))
    PROVIDE(__stop_log_dynamic_data = .);
  } &amp;gt; RAM
  .log_filter_data :
  {
    PROVIDE(__start_log_filter_data = .);
    KEEP(*(SORT(.log_filter_data*)))
    PROVIDE(__stop_log_filter_data = .);
  } &amp;gt; RAM

} INSERT AFTER .data;

SECTIONS
{
  .mem_section_dummy_rom :
  {
  }
  .log_const_data :
  {
    PROVIDE(__start_log_const_data = .);
    KEEP(*(SORT(.log_const_data*)))
    PROVIDE(__stop_log_const_data = .);
  } &amp;gt; FLASH
  .log_backends :
  {
    PROVIDE(__start_log_backends = .);
    KEEP(*(SORT(.log_backends*)))
    PROVIDE(__stop_log_backends = .);
  } &amp;gt; FLASH
    .nrf_balloc :
  {
    PROVIDE(__start_nrf_balloc = .);
    KEEP(*(.nrf_balloc))
    PROVIDE(__stop_nrf_balloc = .);
  } &amp;gt; FLASH

} INSERT AFTER .text

INCLUDE &amp;quot;nrf_common.ld&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also are there any resource for linker files in nrf SDK?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165587?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 18:04:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07bcd5bb-a804-436e-8063-c024f4034ea3</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &amp;quot;show copying&amp;quot;
and &amp;quot;show warranty&amp;quot; for details.
This GDB was configured as &amp;quot;--host=x86_64-pc-linux-gnu --target=arm-none-eabi&amp;quot;.
Type &amp;quot;show configuration&amp;quot; for configuration details.
For bug reporting instructions, please see:
&amp;lt;http://www.gnu.org/software/gdb/bugs/&amp;gt;.
Find the GDB manual and other documentation resources online at:
&amp;lt;http://www.gnu.org/software/gdb/documentation/&amp;gt;.
For help, type &amp;quot;help&amp;quot;.
Type &amp;quot;apropos word&amp;quot; to search for commands related to &amp;quot;word&amp;quot;.
(gdb) target extended-remote /dev/ttyACM0
Remote debugging using /dev/ttyACM0
(gdb) monitor swdp
Target voltage: unknown
Available Targets:
No. Att Driver
 1      Nordic nRF52
 2      Nordic nRF52 Access Port
(gdb) attach 1
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the &amp;quot;file&amp;quot; command.
0x00003aa8 in ?? ()
(gdb) file _build/nrf52840_xxaa.out
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from _build/nrf52840_xxaa.out...done.
(gdb) break nrf_drv_twi_tx
Breakpoint 1 at 0x5e52: file ../../../../../../integration/nrfx/legacy/nrf_drv_twi.h, line 541.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/rohit/Documents/wearables/Implementation/nrf52840/code/NRFSDK/nRF5_SDK_15.2.0_9412b96/examples/peripheral/twi_scanner_rohit/pca10056/blank/armgcc/_build/nrf52840_xxaa.out 
Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, nrf_drv_twi_tx (p_instance=0x2003ffa0, address=104 &amp;#39;h&amp;#39;, p_data=0x2003ffcc &amp;quot;u&amp;quot;, length=1 &amp;#39;\001&amp;#39;, no_stop=false)
    at ../../../../../../integration/nrfx/legacy/nrf_drv_twi.h:541
541	    ret_code_t result = 0;
(gdb) step
544	        result = nrfx_twim_tx(&amp;amp;p_instance-&amp;gt;u.twim,
(gdb) step
nrfx_twim_tx (p_instance=0x2003ffa4, address=104 &amp;#39;h&amp;#39;, p_data=0x2003ffcc &amp;quot;u&amp;quot;, length=1, no_stop=false)
    at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:505
505	    nrfx_twim_xfer_desc_t xfer = NRFX_TWIM_XFER_DESC_TX(address, (uint8_t*)p_data, length);
(gdb) step
507	    return nrfx_twim_xfer(p_instance, &amp;amp;xfer, no_stop ? NRFX_TWIM_FLAG_TX_NO_STOP : 0);
(gdb) step
nrfx_twim_xfer (p_instance=0x2003ffa4, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:474
474	    nrfx_err_t err_code = NRFX_SUCCESS;
(gdb) step
475	    twim_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx];
(gdb) step
492	    err_code = twim_xfer(p_cb, (NRF_TWIM_Type *)p_instance-&amp;gt;p_twim, p_xfer_desc, flags);
(gdb) step
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:306
306	    nrfx_err_t err_code = NRFX_SUCCESS;
(gdb) step
307	    nrf_twim_task_t  start_task = NRF_TWIM_TASK_STARTTX;
(gdb) step
308	    nrf_twim_event_t evt_to_wait = NRF_TWIM_EVENT_STOPPED;
(gdb) step
310	    if (!nrfx_is_in_ram(p_xfer_desc-&amp;gt;p_primary_buf))
(gdb) step
nrfx_is_in_ram (p_object=0x2003ffcc) at ../../../../../../modules/nrfx/drivers/nrfx_common.h:257
257	    return ((((uint32_t)p_object) &amp;amp; 0xE0000000u) == 0x20000000u);
(gdb) step
258	}
(gdb) step
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:319
319	    nrf_twim_int_disable(p_twim, NRF_TWIM_ALL_INTS_MASK);
(gdb) step
nrf_twim_int_disable (p_reg=0x40003000, int_mask=27001346) at ../../../../../../modules/nrfx/hal/nrf_twim.h:414
414	    p_reg-&amp;gt;INTENCLR = int_mask;
(gdb) step
415	}
(gdb) step
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:320
320	    if (p_cb-&amp;gt;busy)
(gdb) 
331	        p_cb-&amp;gt;busy = ((NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER &amp;amp; flags) ||
(gdb) 
332	                      (NRFX_TWIM_FLAG_REPEATED_XFER &amp;amp; flags)) ? false: true;
(gdb) 
331	        p_cb-&amp;gt;busy = ((NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER &amp;amp; flags) ||
(gdb) 
335	    p_cb-&amp;gt;xfer_desc = *p_xfer_desc;
(gdb) 
336	    p_cb-&amp;gt;repeated = (flags &amp;amp; NRFX_TWIM_FLAG_REPEATED_XFER) ? true : false;
(gdb) 
337	    nrf_twim_address_set(p_twim, p_xfer_desc-&amp;gt;address);
(gdb) 
nrf_twim_address_set (p_reg=0x40003000, address=104 &amp;#39;h&amp;#39;) at ../../../../../../modules/nrfx/hal/nrf_twim.h:460
460	    p_reg-&amp;gt;ADDRESS = address;
(gdb) 
461	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:339
339	    nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED);
(gdb) 
nrf_twim_event_clear (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:374
374	    *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL;
(gdb) 
376	    volatile uint32_t dummy = *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event));
(gdb) 
377	    (void)dummy;
(gdb) 
379	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:340
340	    nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR);
(gdb) 
nrf_twim_event_clear (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:374
374	    *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL;
(gdb) 
376	    volatile uint32_t dummy = *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event));
(gdb) 
377	    (void)dummy;
(gdb) 
379	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:342
342	    twim_list_enable_handle(p_twim, flags);
(gdb) 
twim_list_enable_handle (p_twim=0x40003000, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:283
283	    if (NRFX_TWIM_FLAG_TX_POSTINC &amp;amp; flags)
(gdb) 
289	        nrf_twim_tx_list_disable(p_twim);
(gdb) 
nrf_twim_tx_list_disable (p_reg=0x40003000) at ../../../../../../modules/nrfx/hal/nrf_twim.h:502
502	    p_reg-&amp;gt;TXD.LIST = 0;
(gdb) 
503	}
(gdb) 
twim_list_enable_handle (p_twim=0x40003000, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:292
292	    if (NRFX_TWIM_FLAG_RX_POSTINC &amp;amp; flags)
(gdb) 
298	        nrf_twim_rx_list_disable(p_twim);
(gdb) 
nrf_twim_rx_list_disable (p_reg=0x40003000) at ../../../../../../modules/nrfx/hal/nrf_twim.h:512
512	    p_reg-&amp;gt;RXD.LIST = 0;
(gdb) 
513	}
(gdb) 
twim_list_enable_handle (p_twim=0x40003000, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:300
300	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:343
343	    switch (p_xfer_desc-&amp;gt;type)
(gdb) 
387	        nrf_twim_tx_buffer_set(p_twim, p_xfer_desc-&amp;gt;p_primary_buf, p_xfer_desc-&amp;gt;primary_length);
(gdb) 
nrf_twim_tx_buffer_set (p_reg=0x40003000, p_buffer=0x2003ffcc &amp;quot;u&amp;quot;, length=1) at ../../../../../../modules/nrfx/hal/nrf_twim.h:467
467	    p_reg-&amp;gt;TXD.PTR    = (uint32_t)p_buffer;
(gdb) 
468	    p_reg-&amp;gt;TXD.MAXCNT = length;
(gdb) 
469	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:388
388	        if (NRFX_TWIM_FLAG_TX_NO_STOP &amp;amp; flags)
(gdb) 
397	            nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STOP_MASK);
(gdb) 
nrf_twim_shorts_set (p_reg=0x40003000, shorts_mask=512) at ../../../../../../modules/nrfx/hal/nrf_twim.h:482
482	    p_reg-&amp;gt;SHORTS = shorts_mask;
(gdb) 
483	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:398
398	            p_cb-&amp;gt;int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK;
(gdb) 
400	        nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME);
(gdb) 
nrf_twim_task_trigger (p_reg=0x40003000, task=NRF_TWIM_TASK_RESUME) at ../../../../../../modules/nrfx/hal/nrf_twim.h:362
362	    *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL;
(gdb) 
363	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:401
401	        break;
(gdb) 
414	    if (!(flags &amp;amp; NRFX_TWIM_FLAG_HOLD_XFER) &amp;amp;&amp;amp; (p_xfer_desc-&amp;gt;type != NRFX_TWIM_XFER_TXTX))
(gdb) 
416	        nrf_twim_task_trigger(p_twim, start_task);
(gdb) 
nrf_twim_task_trigger (p_reg=0x40003000, task=NRF_TWIM_TASK_STARTTX) at ../../../../../../modules/nrfx/hal/nrf_twim.h:362
362	    *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL;
(gdb) 
363	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:419
419	    if (p_cb-&amp;gt;handler)
(gdb) 
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_ERROR) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:441
441	        while (!nrf_twim_event_check(p_twim, evt_to_wait))
(gdb) 
nrf_twim_event_check (p_reg=0x40003000, event=NRF_TWIM_EVENT_STOPPED) at ../../../../../../modules/nrfx/hal/nrf_twim.h:384
384	    return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
(gdb) 
385	}
(gdb) 
twim_xfer (p_cb=0x20000850 &amp;lt;m_cb&amp;gt;, p_twim=0x40003000, p_xfer_desc=0x2003ff54, flags=0) at ../../../../../../modules/nrfx/drivers/src/nrfx_twim.c:443
443	            if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
(gdb) quit
A debugging session is active.

	Inferior 1 [Remote target] will be killed.

Quit anyway? (y or n) y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165523?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 14:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67581d33-7af1-4c21-943d-367d3d864b93</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;i dont have segger or keil. i am using gcc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165501?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 14:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b449736-298b-42b3-8c59-6c6bc4b5782a</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Can you please take a look at the &lt;a href="https://www.nordicsemi.com/DocLib/Content/User_Guides/gsg_ses/latest/UG/gsg/debug"&gt;debugging guide for Segger Embedded Studio?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is also one for &lt;a href="https://www.nordicsemi.com/DocLib/Content/User_Guides/gsg_keil/latest/UG/gsg/debug"&gt;Keil &lt;/a&gt;here.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165495?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 14:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd53593a-4414-4bbf-9583-23e4621e5939</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;I dont get any error. It just gets stuck.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165480?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 13:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc01a863-0b2d-40d9-af9a-6ea1dde760e5</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Can you try to debug the project and set a breakpoint on nrf_drv_twi_tx and step throught the code until you get an error code?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use TWI on nrf52840</title><link>https://devzone.nordicsemi.com/thread/165317?ContentTypeID=1</link><pubDate>Sun, 13 Jan 2019 13:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9c46a6e-6fea-44bb-a485-dc5b717893b8</guid><dc:creator>rgujju</dc:creator><description>&lt;p&gt;I have tried the using the twi_scanner example. but it seems to get stuck at&amp;nbsp;nrf_drv_twi_rx. I have checked using gdb as well and it is actually getting stuck and not causing a segmentation fault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>