<?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>How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49116/how-to-use-lis2dh12-with-latest-sdk-15-3-spi</link><description>Hi I would like to use sdk15.3 with the \nRF5_SDK_15.3.0_59ac345\components\drivers_ext\lis2dh12 but I need to have it with SPI. Is this possible?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Sep 2019 00:51:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49116/how-to-use-lis2dh12-with-latest-sdk-15-3-spi" /><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/209955?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2019 00:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3e949ee-b3d6-43fc-a04f-e1be1b809357</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I added a low-level LIS2DH12 example in this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52218/unexpected-events_endrx-events_endtx-spim-interrupts-when-only-events_end-interrupt-enabled"&gt;unexpected-events&lt;/a&gt;&amp;nbsp;SPIM post which may be of use&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/197336?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2019 11:05:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a78bbb60-257e-417a-9c45-6adc5ad7a3d8</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You do not need to use the SPI manager library. I suggest you&amp;nbsp;start with the spi example, remove the old SPI driver&amp;nbsp;and use the&amp;nbsp;nrfx_spim.c driver located in&amp;nbsp;&amp;#39;nRF5_SDK_15.3\modules\nrfx\drivers\src&amp;#39;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s&amp;nbsp;the necessary&amp;nbsp;&lt;a title="SPIM driver" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__spim.html?cp=5_1_6_9_0_30_0"&gt;SPIM driver&lt;/a&gt; API doc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I suggest you send a couple of bytes from the SPIM and verify that it works with a digital analyzer before you start testing with the&amp;nbsp;&lt;span&gt;lis2dh12.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196686?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 02:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21334815-e9a8-41c1-bb14-7fad4cde3e8e</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Ah, so sorry - I am Old School. i2c (I2C) was the original multi-master, multi-slave, 2-wire communication protocol back in the early 80s and was great for its time. TWI is the same thing (pretty much, only a few differences) and I forget that TWI is now often used as the generic term - particularly with the Nordic teams. It&amp;#39;s a bit like &lt;em&gt;DFU&lt;/em&gt; - what? Oh, you mean &lt;em&gt;OTA&lt;/em&gt;. Times change...&lt;/p&gt;
&lt;p&gt;Anyway, to clarify, &amp;quot;get rid of anything with TWI in the name and just use SPI&amp;quot; is what I was suggesting in my earlier posts. All the code you need for SPI I posted earlier, but perhaps start with running a Nordic example as the Nordic engineer suggests. For what you are doing (LIS2DH12 single slave sensor, nRF52832 single master) SPI is much easier than i2c (aka TWI). TWI is inherently slow as it requires the use of open-drain drivers (which allows multiple masters and multiple slaves). SPI instead uses an extra signal to select multiple slaves - Chip Select, usually /CS or NCS. On the nRF52 SPI can run up to 16MHz in single data mode, 4 x faster in quad (QSPI) mode. TWI is slow by comparison, 100kHz or 400kHz typically. The LIS2DH12 runs at 10MHz, 8MHz when used with nRF52832 as 10MHz is not a (supported) option.&lt;/p&gt;
&lt;p&gt;The other thing of beauty with SPI is that you cannot possibly get the pins connected wrong (oh yeah&amp;nbsp; ..); unlike serial uarts, for example, which use Tx and Rx. Tx? Tx from who? To whom? Rx from whom? To whom? One cpu/PC Tx is another cpu Rx/Tx so maybe swap the wires around and see if it works better. &lt;em&gt;MISO&lt;/em&gt;, only an idiot can get that mixed up with &lt;em&gt;MOSI&lt;/em&gt;&amp;nbsp;. Many slaves, single master.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196684?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 01:48:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c5721a3-0280-42a7-86e2-df871d5a4ffa</guid><dc:creator>Bluesky</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I believe this is twi mean i2C nrf_twi_sensor_write(p_inst-&amp;gt;p_sensor_data,p_inst-&amp;gt;sensor_addr,time_msg,ARRAY_SIZE(time_msg),true); can you please let me know how exactly you make this work for spi? where should the place to add your code in. I really need this urgently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196679?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 23:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dd48974-39fa-4228-9873-220966b7ab2b</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Don&amp;#39;t use any of the i2c files and settings; SPI is much simpler and I see you don&amp;#39;t have i2c anyway ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196360?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 02:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a935c3a4-6eac-4a4f-8f0c-7d0dbea3164e</guid><dc:creator>Bluesky</dc:creator><description>&lt;p&gt;there is no SPIM for my case, I am using 15.3 SDK&amp;nbsp;nRF5_SDK_15.3.0_59ac345\examples\peripheral\spi_master_using_nrf_spi_mngr&lt;/p&gt;
&lt;p&gt;Is this the same? but there is a LCD with the example which makes the code more complex.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196359?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 02:06:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:148b6faa-dd04-4808-b015-ccbcfc58c38b</guid><dc:creator>Bluesky</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi hmolesworth,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks, but the lis2dh12 from the drivers_ext are using TWI can we just use it without changing anything?&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t lis2dh12_cfg_commit(lis2dh12_instance_t * p_inst)
{
    ASSERT(p_inst != NULL);
    ret_code_t err;
    p_inst-&amp;gt;ctrl0 &amp;amp;= ~LIS2DH12_CTRL_REG0_VALID_MASK;
    p_inst-&amp;gt;ctrl0 |= LIS2DH12_CTRL_REG0_VALID_SET;

    uint8_t ctrl_msg[] = {
        LIS2DH12_REG_CTRL_REG0 | LIS2DH12_AUTO_INCR_MASK,
        p_inst-&amp;gt;ctrl0,
        p_inst-&amp;gt;temp_cfg,
        p_inst-&amp;gt;ctrl1,
        p_inst-&amp;gt;ctrl2,
        p_inst-&amp;gt;ctrl3,
        p_inst-&amp;gt;ctrl4,
        p_inst-&amp;gt;ctrl5,
        p_inst-&amp;gt;ctrl6,
        p_inst-&amp;gt;reference
    };
    err = nrf_twi_sensor_write(p_inst-&amp;gt;p_sensor_data,
                               p_inst-&amp;gt;sensor_addr,
                               ctrl_msg,
                               ARRAY_SIZE(ctrl_msg),
                               true);
    RETURN_IF_ERR(err);
    uint8_t fifo_msg[] = {
        LIS2DH12_REG_FIFO_CTRL | LIS2DH12_AUTO_INCR_MASK,
        p_inst-&amp;gt;fifo_ctrl,
        0,
        p_inst-&amp;gt;int1_cfg,
        0,
        p_inst-&amp;gt;int1_ths,
        p_inst-&amp;gt;int1_dur,
        p_inst-&amp;gt;int2_cfg,
        0,
        p_inst-&amp;gt;int2_ths,
        p_inst-&amp;gt;int2_dur,
        p_inst-&amp;gt;click_cfg
    };
    err = nrf_twi_sensor_write(p_inst-&amp;gt;p_sensor_data,
                               p_inst-&amp;gt;sensor_addr,
                               fifo_msg,
                               ARRAY_SIZE(fifo_msg),
                               true);
    RETURN_IF_ERR(err);

    uint8_t time_msg[] = {
        LIS2DH12_REG_CLICK_THS | LIS2DH12_AUTO_INCR_MASK,
        p_inst-&amp;gt;click_ths,
        p_inst-&amp;gt;time_lim,
        p_inst-&amp;gt;latency,
        p_inst-&amp;gt;time_win,
        p_inst-&amp;gt;act_ths,
        p_inst-&amp;gt;act_dur
    };
    err = nrf_twi_sensor_write(p_inst-&amp;gt;p_sensor_data,
                               p_inst-&amp;gt;sensor_addr,
                               time_msg,
                               ARRAY_SIZE(time_msg),
                               true);
    return err;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am really confuse that where should I start from what you said.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Device identification register - LIS3DH has same code as LIS2DH12
#define WHO_AM_I        0x0F
#define I_AM_LIS3DH     0x33
#define I_AM_LIS2DH     0x33

/**
 * @brief SPI event handler indicating SPI transfer has completed
 * @param event
 */
static void acc_spi_event_handler(nrf_drv_spi_evt_t const * p_event, void *p_context)
{
    mAccPacketTransferComplete = true;
}

/**
 * @brief Function Send a command to read Id
 * This function sends a one-byte command to ACC via SPI
 * @param[in] none
 */
static uint8_t AccWhoAmI(void)
{
    uint8_t tx_buf[] = {0x80|LIS2DH12_WHO_AM_I, 0xFF};
    uint8_t rx_buf[sizeof(tx_buf)];
    uint16_t length = sizeof(tx_buf);

    memset(rx_buf, &amp;#39;?&amp;#39;, length);
    mAccPacketTransferComplete = false;
    APP_ERROR_CHECK(nrf_drv_spi_transfer(&amp;amp;mAccSpiInstance, tx_buf, length, rx_buf, length));
    // Check for successful transfer
    while (!mAccPacketTransferComplete) ;
    // Confirm we have a connection, should be I_AM_LIS2DH
    return rx_buf[1];
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For instance, there do you mean to put these code? in the main.c ? or the lis2dh12 driver.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;sorry that I am really confuse.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196328?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 16:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8f52cc-00db-49c6-bfc2-65935b9b71b9</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The code I posted above is all the code required to get it working. The difficult part is navigating sd_config.h. I have the following enabled (all others set to &amp;#39;0&amp;#39;)::&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRFX_SPI2_ENABLED 1
#define NRFX_SPIM2_ENABLED 1
#define SPI2_ENABLED 1
#define SPI2_USE_EASY_DMA 1
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The various macros mess with these settings, so I don&amp;#39;t actually know if they are correct, but it seems to work!&lt;/p&gt;
&lt;p&gt;Start by reading the Id code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Device identification register - LIS3DH has same code as LIS2DH12
#define WHO_AM_I        0x0F
#define I_AM_LIS3DH     0x33
#define I_AM_LIS2DH     0x33

/**
 * @brief SPI event handler indicating SPI transfer has completed
 * @param event
 */
static void acc_spi_event_handler(nrf_drv_spi_evt_t const * p_event, void *p_context)
{
    mAccPacketTransferComplete = true;
}

/**
 * @brief Function Send a command to read Id
 * This function sends a one-byte command to ACC via SPI
 * @param[in] none
 */
static uint8_t AccWhoAmI(void)
{
    uint8_t tx_buf[] = {0x80|LIS2DH12_WHO_AM_I, 0xFF};
    uint8_t rx_buf[sizeof(tx_buf)];
    uint16_t length = sizeof(tx_buf);

    memset(rx_buf, &amp;#39;?&amp;#39;, length);
    mAccPacketTransferComplete = false;
    APP_ERROR_CHECK(nrf_drv_spi_transfer(&amp;amp;mAccSpiInstance, tx_buf, length, rx_buf, length));
    // Check for successful transfer
    while (!mAccPacketTransferComplete) ;
    // Confirm we have a connection, should be I_AM_LIS2DH
    return rx_buf[1];
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196181?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 08:44:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31ac29df-61e0-45d5-a83f-974c1fb5d080</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Use the sdk/examples/peripheral/SPIM example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196137?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 07:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:407b7cbf-b1ec-4ba5-9316-54c98d19b699</guid><dc:creator>Bluesky</dc:creator><description>&lt;p&gt;I have tried with ble_app_uart but the lis2dh12 doesn&amp;#39;t works fine, btw I didnt get the twi working for lis2dh12 as I only have the nordic with lis2dh12 with SPI instead of i2C.&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/196120?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 05:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8565b37-e568-4ac2-af9f-6900a2ca9737</guid><dc:creator>Bluesky</dc:creator><description>&lt;p&gt;Hi hmolesworth,&lt;/p&gt;
&lt;p&gt;Can you please show a clearer example that I can use for this application? I am not sure which example I can apply so that this is working fine.&lt;/p&gt;
&lt;p&gt;Thanks and have a nice day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/195421?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 15:36:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c9c796b-88c4-483d-8cea-f80ed82aa20c</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Take one of the 15.3.0 SPI examples and use the code I show here for initialisation, which works with the LIS2DH12. Since you already have i2c functional, that should get you most of the way there. SPI is much cleaner to use than i2c.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Description
// ===========
// The LIS2DH12 is an ultra-low-power highperformance three-axis linear accelerometer
// belonging to the femto family with digital I2C/SPI serial interface standard output.
// The LIS2DH12 has user-selectable full scales of +-2g/4g/8g/16g and is capable of measuring
// accelerations with output data rates from 1 Hz to 5.3 kHz.
// The self-test capability allows the user to check the functionality of the sensor in the final
// application.
// The device may be configured to generate interrupt signals by detecting two independent
// inertial wake-up/free-fall events as well as by the position of the device itself.
//
// SPI Interface
// =============
// bit 0: RW bit. When 0, the data DI(7:0) is written into the device. When 1, the data DO(7:0)
//                from the device is read. In the latter case, the chip will drive SDO at the start of bit 8.
// bit 1: MS bit. When 0, the address will remain unchanged in multiple read/write commands.
//                When 1, the address is auto incremented in multiple read/write commands.
// bit 2-7:  address AD(5:0). This is the address field of the indexed register.
// bit 8-15: data DI(7:0) (write mode). This is the data that is written into the device (MSb first).
// bit 8-15: data DO(7:0) (read mode). This is the data that is read from the device (MSb first).
//                In multiple read/write commands further blocks of 8 clock periods will be added. When the
//                MS bit is 0, the address used to read/write data remains the same for every block. When
//                the MS bit is 1, the address used to read/write data is increased at every block.

    nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
    ret_code_t err_code;

    spi_config.ss_pin    = LIS2DH12_CS_PIN;
    spi_config.miso_pin  = LIS2DH12_MISO_PIN;
    spi_config.mosi_pin  = LIS2DH12_MOSI_PIN;
    spi_config.sck_pin   = LIS2DH12_SCK_PIN;
    spi_config.frequency = NRF_DRV_SPI_FREQ_8M;  // LIS2DH12 works up to 10MHz on SPI
    spi_config.bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST;
    spi_config.mode      = NRF_DRV_SPI_MODE_0;
    APP_ERROR_CHECK(nrf_drv_spi_init(&amp;amp;mLis2dh12SpiInstance, &amp;amp;spi_config, Lis2dh12_spi_event_handler, NULL));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The event handler should be kept ultra-simple:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Interrupt-driven events related to ADC sampling
static volatile bool mLisPacketTransferComplete = false;

/**
 * @brief SPI event handler indicating SPI transfer has completed
 * @param event
 */
static void lis2dh12_spi_event_handler(nrf_drv_spi_evt_t const * p_event, void *p_context)
{
    mLisPacketTransferComplete = true;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Choose an SPI not used elsewhere:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SPI_INSTANCE  2   // SPI instance index
static const nrf_drv_spi_t mLisSpiInstance = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Transmit and wait for a result (simplistic example):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; // Send a command
 APP_ERROR_CHECK(nrf_drv_spi_transfer(&amp;amp;mLisSpiInstance, tx_buf, length, rx_buf, length));
 // Check for successful transfer
 while (!mLisPacketTransferComplete) ;
 // Completed ok&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you have issues with nrfx instead of nrf, this might be helpful&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined(NRFX_SPI2_ENABLED)
#warning NRFX_SPI2_ENABLED
#endif
#if defined(NRFX_SPIM2_ENABLED)
#warning NRFX_SPIM2_ENABLED
#endif
#if defined(NRF_SPI2_ENABLED)
#warning NRF_SPI2_ENABLED
#endif
#if defined(NRF_SPIM2_ENABLED)
#warning NRF_SPIM2_ENABLED
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Good luck, it works well. If you are going off-board via leads longer than an inch/25mm or so then boost the drive level on CLK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use lis2dh12 with latest SDK 15.3 (SPI)</title><link>https://devzone.nordicsemi.com/thread/195304?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 09:15:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49dbb51d-e289-4249-bf6d-77e79cbbdb05</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Yes of course, but you&amp;#39;ll have to port from TWI to SPI yourself.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>