<?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>No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64902/no-readings-from-lsm9ds1-using-twi-example</link><description>Hi all, 
 Currently employing my custom board definition for Arduino Nano 33 BLE for use with the nRF5 SDK. So far I have gotten an array of examples working including the ANT+ Bike Power example. I am now porting LSM9DS1 drivers to use the Nano 33&amp;#39;s</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Aug 2020 17:49:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64902/no-readings-from-lsm9ds1-using-twi-example" /><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265192?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 17:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43dd41c1-8157-4b82-916a-56b740384cb8</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Looks good, thanks for the feedback. Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265184?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 16:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86f9c69f-47e1-4312-ad85-7c141dbe0822</guid><dc:creator>drewvigne</dc:creator><description>&lt;p&gt;They sell two nRF52840 variants:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Arduino Nano 33 BLE - has only the LSM9DS1 (I&amp;#39;m using this one)&lt;/li&gt;
&lt;li&gt;Arduino Nano 33 BLE Sense - has an array of sensors including the LPS22 and LSM9DS1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My GitHub repo, Arduino_Nano_33_ANT, may be of use to you if you&amp;nbsp;go down this path. Contains the board def, some compatible examples, etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265174?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 16:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4e2a03e-9a7f-43a2-9609-b8fdddf5fa6c</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Nice! Looking at the circuit there is an LPS22 pressure sensor, but the doc doesn&amp;#39;t seem to mention it .. is it fitted to the board? That&amp;#39;s a nice board, I&amp;#39;ve been using the Feather boards for development but might try this ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265172?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 16:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5786ba8b-a605-4fd1-bb4a-0cd0dd84cc24</guid><dc:creator>drewvigne</dc:creator><description>&lt;p&gt;Brilliant. Just created a function to do that and added it to main. Detects the I2C sensor addresses flawlessly. Cheers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265171?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 15:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf39b0cc-1f66-4a43-8632-85575c905dff</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Quite so, I assumed you already had those set; ensure they are both high-drive (S0H1), 2 x 4k7 is quite a load but it will work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define  PIN_VDD_ENV    (22)
#define  PIN_R_PULLUP   ( 0+32)

  nrf_gpio_pin_set(PIN_VDD_ENV);
  nrf_gpio_pin_set(PIN_R_PULLUP);
  // Power up and wait for voltage to rise
  nrf_gpio_cfg(PIN_VDD_ENV,  NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0H1, NRF_GPIO_PIN_NOSENSE);
  nrf_gpio_cfg(PIN_R_PULLUP, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0H1, NRF_GPIO_PIN_NOSENSE);
  nrf_delay_ms(4);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I see at least 4u7 capacitance, so you might have to extend the 4mSec delay to allow that to charge, maybe 10mSec&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265167?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 15:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b0883ac-c908-4a8f-bd1a-0be0ce7a5aaf</guid><dc:creator>drewvigne</dc:creator><description>&lt;p&gt;Tried this and unfortunately it did not work. Could it be my board definition? The Arduino has VDD_ENV and R_PULLUP mappings so I wonder if there is a function in NRF_GPIO that handles this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265165?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 15:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89007d56-190e-4f67-be98-62148b28ea76</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Pull-ups are 4k7, which is fine for 100KHz but with multiple devices the nRF52 will struggle to get good low-level drive on the settings you are using. Try switching to H0D1 (High Drive &amp;#39;0&amp;#39;, Disconnect Drive &amp;#39;1&amp;#39;) thus:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void twi_init (void)
{
    ret_code_t err_code;
    const nrf_drv_twi_config_t twi_config = {
       .scl                = ARDUINO_SCL1_PIN,
       .sda                = ARDUINO_SDA1_PIN,
       .frequency          = NRF_DRV_TWI_FREQ_100K,
       .interrupt_priority = APP_IRQ_PRIORITY_HIGH,
       .clear_bus_init     = false
    };
    err_code = nrf_drv_twi_init(&amp;amp;m_twi, &amp;amp;twi_config, NULL, NULL);
    APP_ERROR_CHECK(err_code);
    nrf_drv_twi_enable(&amp;amp;m_twi);
    // To secure correct signal levels on the pins used by the TWI master when the system is in OFF mode, and
    // when the TWI master is disabled, SDA and SCL pins must be configured in the GPIO peripheral as follows:
    // SCL As specified in PSEL.SCL: Input H0D1
    // SDA As specified in PSEL.SDA: Input H0D1
    nrf_gpio_cfg(ARDUINO_SDA1_PIN, NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_CONNECT, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_H0D1, NRF_GPIO_PIN_NOSENSE);
    nrf_gpio_cfg(ARDUINO_SCL1_PIN, NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_CONNECT, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_H0D1, NRF_GPIO_PIN_NOSENSE);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265156?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 14:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a613cfc6-2307-413e-9b2f-507270cef774</guid><dc:creator>drewvigne</dc:creator><description>&lt;p&gt;&lt;a href="https://content.arduino.cc/assets/NANO33BLE_V2.0_sch.pdf" rel="noopener noreferrer" target="_blank"&gt;Here &lt;/a&gt;is the schematic I&amp;#39;m dealing with. We have a VDD, SDA1, SCL1, and of course ground connections being made. Arduino did a silly thing not to include the interrupt pin but that&amp;#39;s a different issue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m testing with only the unmodified scanner example now. Unable to communicate with the slave whatsoever. Debugging currently but still unsure of the issue. I wonder if it has to do with a pullup.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No readings from LSM9DS1 using TWI example</title><link>https://devzone.nordicsemi.com/thread/265111?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2983a0b8-6428-4b2b-b7a7-618e72bbdda7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Note:&amp;nbsp;Also working with the TWI scanner example. Same issue here... getting stuck in the device id portion of the code.[/quote]
&lt;p&gt;It is not clear to me whether you are able to communicate with the slave device at all. Are you? What happens if you use an unmodified TWI scanner example? Is the slave found? If not, we need to look at that first, so make sure the basics are in place.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>