<?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>NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board</link><description>Hello, 
 I am trying to code nRF52840- DK with MAX30003 ECG Board Using SPI. I have referred Arduino Uno Code for MAX30003 ECG. 
 I need some help for Driver Development if anybody worked on this please share any info. 
 
 
 Thanks and Regards, 
 Roh</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Oct 2018 13:03:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board" /><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/153827?ContentTypeID=1</link><pubDate>Mon, 22 Oct 2018 13:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:780f05de-cc3a-4e94-9afd-84bd640d418d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The digital analyzer tool in Keil is not supported. You&amp;#39;ll probably need a j-link Pro in order to use it, but I do not really know how to use that Keil feature.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I do not know what signal you are sampling with the oscilloscope, but you need to sample all four signals at the same time in order verify correct operation of the SPIM peripheral. You will also need to trigger the sampling from the transition of the chip/slave select signal from high to low, instead of a &amp;#39;free running&amp;#39; sampling scheme like what you are doing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I believe I&amp;#39;ve made a mistake in the code I posted:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;quot;&lt;em&gt;The content of the SPI operation consists of a one byte command word (comprised of a seven bit address and a Read/Write mode indicator, i.e., A[6:0] + R/W) followed by a three-byte data word.&amp;quot;&lt;/em&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;SPI_TX_Buff[0] = (Reg_address&amp;lt;&amp;lt;1 ) | RREG;  // 0x1F, 0b00011111

// Should be:

SPI_TX_Buff[0] = Reg_address | (RREG &amp;lt;&amp;lt; 7); // 0x8F, 0b10001111&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Also, &amp;quot;&lt;em&gt;Note: due to internal initialization procedures, this command will not read-back valid data if it is the first command executed following either a power-cycle event, or a SW_RST event.&amp;quot;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;Finnaly I need to say that @awneil has a point. I can help you set up the SPIM drivers and verify that the SPIM peripheral is working as intended, but other than that you really should go to MAXIM for help. They probably have a driver that&amp;#39;s easily ported to our platform.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/152964?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 07:02:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f20d2e8-7164-425c-99e6-af7f3a4b62a8</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;Hi HaaKonsh,&lt;/p&gt;
&lt;p&gt;I have to plot SPI_RX Buff value on the Keil5 logic analyzer, but I&amp;nbsp;unable&amp;nbsp;to plot this value may&amp;nbsp; I know&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is this a supported function?&lt;/p&gt;
&lt;p&gt;if it is supported then how to read that value?&lt;/p&gt;
&lt;p&gt;I got below errors. please let me know?&lt;/p&gt;
&lt;p&gt;Much Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Logic-Analyser-Output.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/152750?ContentTypeID=1</link><pubDate>Sat, 13 Oct 2018 10:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93ea27df-9205-4d71-8dbb-0cc75ce83989</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;You&amp;#39;ve already forgotten how to properly post source code, then?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="73307" url="~/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board/152748"]&lt;span&gt;I want to know, h&lt;/span&gt;ow to analyze that received data is correct or not?[/quote]
&lt;p&gt;Really, that has nothing at all to do with Nordic - that&amp;#39;s entirely up to you and the specifics of your application.&lt;/p&gt;
&lt;p&gt;Again, you need to look to &lt;strong&gt;Maxim&lt;/strong&gt; and the&amp;nbsp;MAX30003&lt;span&gt;&amp;nbsp;&lt;strong&gt;documentation&lt;/strong&gt; for answers to such questions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Their product page is here:&amp;nbsp;&lt;a href="https://www.maximintegrated.com/en/products/analog/data-converters/analog-front-end-ics/MAX30003.html"&gt;https://www.maximintegrated.com/en/products/analog/data-converters/analog-front-end-ics/MAX30003.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Look under &amp;#39;Design Resources&amp;#39; - they have an evaluation kit&amp;nbsp;, development platform, reference design, Tutorial, Application Note, and other resources ...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note also their &amp;#39;&lt;strong&gt;Support&lt;/strong&gt;&amp;#39; link at the left-hand side of the page&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/152748?ContentTypeID=1</link><pubDate>Sat, 13 Oct 2018 06:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15a17bc3-9a43-449a-913c-a64540b46e80</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your&amp;nbsp;inputs, Now, I can read&amp;nbsp;&lt;em&gt;INFO (0x0F) register and receive some data in RX buffer but I don&amp;#39;t&amp;nbsp;know whether it is receiving correct data or not, can anyone help me how to verify the data.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;FYR, attaching code&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#define&amp;nbsp; &amp;nbsp;INFO&amp;nbsp; &amp;nbsp;((uint8_t)0x0F)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;MAX30003_Reg_Read(INFO);&lt;br /&gt;bsp_board_init(BSP_INIT_LEDS);&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(NRF_LOG_INIT(NULL));&lt;br /&gt;NRF_LOG_DEFAULT_BACKENDS_INIT();&lt;/p&gt;
&lt;p&gt;// nrfx_spim_xfer_desc_t xfer_desc = NRFX_SPIM_XFER_TRX(m_tx_buf, m_length, m_rx_buf, m_length);&lt;/p&gt;
&lt;p&gt;nrfx_spim_config_t spi_config = NRFX_SPIM_DEFAULT_CONFIG;&lt;br /&gt;spi_config.frequency = SPIM_FREQUENCY_FREQUENCY_K125;&lt;br /&gt;spi_config.ss_pin = NRFX_SPIM_SS_PIN;&lt;br /&gt;spi_config.miso_pin = NRFX_SPIM_MISO_PIN;&lt;br /&gt;spi_config.mosi_pin = NRFX_SPIM_MOSI_PIN;&lt;br /&gt;spi_config.sck_pin = NRFX_SPIM_SCK_PIN;&lt;br /&gt;spi_config.dcx_pin = NRFX_SPIM_DCX_PIN;&lt;br /&gt;spi_config.use_hw_ss = true;&lt;br /&gt;spi_config.ss_active_high = false;&lt;br /&gt;spi_config.mode = NRF_SPIM_MODE_2; // SCK active low, sample on trailing edge of clock&lt;br /&gt; &lt;br /&gt;APP_ERROR_CHECK(nrfx_spim_init(&amp;amp;spi, &amp;amp;spi_config, spim_event_handler, NULL));&lt;br /&gt;nrfx_spim_xfer_desc_t xfer_desc = NRFX_SPIM_XFER_TRX(SPI_TX_Buff, sizeof(SPI_TX_Buff), SPI_RX_Buff, sizeof(SPI_TX_Buff));&lt;br /&gt;NRF_LOG_INFO(&amp;quot;NRFX SPIM example started.&amp;quot;);&lt;br /&gt; &lt;br /&gt;while (1)&lt;br /&gt;{&lt;br /&gt;// Reset rx buffer and transfer done flag&lt;br /&gt;memset(SPI_RX_Buff, 0, m_length);&lt;br /&gt;spi_xfer_done = false;&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(nrfx_spim_xfer_dcx(&amp;amp;spi, &amp;amp;xfer_desc, 0, 15)); &lt;br /&gt;while (!spi_xfer_done)&lt;br /&gt;{&lt;br /&gt;__WFE();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;NRF_LOG_FLUSH();&lt;/p&gt;
&lt;p&gt;bsp_board_led_invert(BSP_BOARD_LED_0);&lt;br /&gt;nrf_delay_ms(200);&lt;br /&gt;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I want to know, h&lt;/span&gt;ow to analyze that received data is correct or not?&lt;/p&gt;
&lt;p&gt;Please check the attached video?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/MAX30003_5F00_ECG_5F00_Waveform.mp4"&gt;devzone.nordicsemi.com/.../MAX30003_5F00_ECG_5F00_Waveform.mp4&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151612?ContentTypeID=1</link><pubDate>Thu, 04 Oct 2018 09:26:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce88507d-ccdb-4318-83e0-6b436af8c157</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So what do you &lt;em&gt;expect&lt;/em&gt; that code to do?&lt;/p&gt;
&lt;p&gt;What does it &lt;em&gt;actually&lt;/em&gt; do?&lt;/p&gt;
[quote userid="13562" url="~/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board/151474"]You should also scope the SPI communication with a digital logical analyzer[/quote]
&lt;p&gt;In other words, you need to examine the signals on the physical connections between the SPI Master (NRF52840-DK) and the SPI Slave (MAX30003 ECG Board) using a logic analyser, oscilloscope, or similar.&lt;/p&gt;
&lt;p&gt;Have you done that?&lt;/p&gt;
&lt;p&gt;What did you see?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151603?ContentTypeID=1</link><pubDate>Thu, 04 Oct 2018 09:03:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:876d67b2-2f63-4cc2-a8dc-d4045216076f</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Haakonsh,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the reply and suggestions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;rohit&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151601?ContentTypeID=1</link><pubDate>Thu, 04 Oct 2018 09:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bd3c5a2-423c-44ef-91ed-646222fd44fb</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;nrfx_spim.h&amp;quot;
#include &amp;quot;app_util_platform.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;lt;string.h&amp;gt;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;
#include &amp;quot;MAX30003.h&amp;quot;

#define NRFX_SPIM_SCK_PIN  3
#define NRFX_SPIM_MOSI_PIN 4
#define NRFX_SPIM_MISO_PIN 28
#define NRFX_SPIM_SS_PIN   29
#define NRFX_SPIM_DCX_PIN  30

#define SPI_INSTANCE  3                                           /**&amp;lt; SPI instance index. */

/* FOR MAX30003 ECG PART */
uint8_t SPI_RX_Buff[6];    /**&amp;lt; RX buffer. */
uint8_t SPI_TX_Buff[6];
static const uint8_t ECG_SIZE = sizeof(SPI_TX_Buff);        /**&amp;lt; Transfer length. */

//volatile char SPI_RX_Buff[5] ;
volatile char *SPI_RX_Buff_Ptr;
 	uint8_t A=0xFF;
  uint8_t A1=0x00;
int i=0;
unsigned long uintECGraw = 0;
signed long intECGraw=0;
uint8_t DataPacketHeader[20];
uint8_t data_len = 8;
signed long ecgdata;
unsigned long data;
char SPI_temp_32b;
char SPI_temp_Burst[100];

static const nrfx_spim_t spi = NRFX_SPIM_INSTANCE(SPI_INSTANCE);  /**&amp;lt; SPI instance. */

static volatile bool spi_xfer_done;  /**&amp;lt; Flag used to indicate that SPI instance completed the transfer. */

#define TEST_STRING &amp;quot;rohit&amp;quot;
static uint8_t       m_tx_buf[] = TEST_STRING;           /**&amp;lt; TX buffer. */
static uint8_t       m_rx_buf[sizeof(TEST_STRING) + 1];  /**&amp;lt; RX buffer. */
static const uint8_t m_length = sizeof(m_tx_buf);        /**&amp;lt; Transfer length. */

void timerIsr()                 //Its configuration is over
{
  	nrf_gpio_pin_toggle(NRF_FCLK_PIN);    // NRF_GPIO_PIN_MAP(1, 00) toggle Digital6 attached to FCLK  of MAX30003
}

void MAX30003_Reg_Write (unsigned char WRITE_ADDRESS, unsigned long data)
{
   nrf_gpio_pin_clear(NRFX_SPIM_SS_PIN);
   uint8_t  dataToSend = (WRITE_ADDRESS&amp;lt;&amp;lt;1) | WREG;
	 uint8_t temp_1 = (data&amp;gt;&amp;gt;16);  //number of register to wr
	 uint8_t temp_2 = (data&amp;gt;&amp;gt;8);
	 nrf_delay_ms(200);
	 
	 nrfx_spim_xfer_desc_t xfer_desc = NRFX_SPIM_XFER_TRX(dataToSend, sizeof(dataToSend), SPI_RX_Buff, sizeof(dataToSend));
	 nrfx_spim_xfer_desc_t xfer_desc1= NRFX_SPIM_XFER_TRX(temp_1,  sizeof(temp_1),  SPI_RX_Buff, sizeof(temp_1));
   nrfx_spim_xfer_desc_t xfer_desc2= NRFX_SPIM_XFER_TRX(temp_2,  sizeof(temp_2),  SPI_RX_Buff, sizeof(temp_2));
   nrfx_spim_xfer_desc_t xfer_desc3= NRFX_SPIM_XFER_TRX(data,       sizeof(data),       SPI_RX_Buff,  sizeof(data));
	 nrf_delay_ms(200);
	 nrf_gpio_pin_set(NRFX_SPIM_SS_PIN);
}

void max30003_sw_reset(void)
{
  MAX30003_Reg_Write(SW_RST,0x000000);     
  nrf_delay_ms(100);
}
void MAX30003_Reg_Read(uint8_t Reg_address)
{

    nrf_gpio_pin_clear(NRFX_SPIM_SS_PIN);
    SPI_TX_Buff[1] = (Reg_address&amp;lt;&amp;lt;1 ) | RREG;
    nrfx_spim_xfer_desc_t xfer_desc4 = NRFX_SPIM_XFER_TRX(SPI_TX_Buff[1], sizeof(SPI_TX_Buff[1]), SPI_RX_Buff, sizeof(SPI_TX_Buff[1]));
   
   for ( i = 0; i &amp;lt; 3; i++)
   {
         SPI_temp_32b[i]= NRFX_SPIM_XFER_TRX(A, sizeof(A), SPI_RX_Buff, sizeof(A));
   }

   nrf_gpio_pin_set(NRFX_SPIM_SS_PIN);
}
void spim_event_handler(nrfx_spim_evt_t const * p_event,
                       void *                  p_context)
{
    spi_xfer_done = true;
    NRF_LOG_INFO(&amp;quot;Transfer completed.&amp;quot;);
    if (m_rx_buf[0] != 0)
    {
        NRF_LOG_INFO(&amp;quot; Received:&amp;quot;);
        NRF_LOG_HEXDUMP_INFO(m_rx_buf, strlen((const char *)m_rx_buf));
    }
}

int main(void)
{
    bsp_board_init(BSP_INIT_LEDS);

    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    nrfx_spim_xfer_desc_t xfer_desc = NRFX_SPIM_XFER_TRX(m_tx_buf, m_length, m_rx_buf, m_length);

    nrfx_spim_config_t spi_config = NRFX_SPIM_DEFAULT_CONFIG;
    spi_config.frequency      = NRF_SPIM_FREQ_1M;
    spi_config.ss_pin         = NRFX_SPIM_SS_PIN;
    spi_config.miso_pin       = NRFX_SPIM_MISO_PIN;
    spi_config.mosi_pin       = NRFX_SPIM_MOSI_PIN;
    spi_config.sck_pin        = NRFX_SPIM_SCK_PIN;
    spi_config.dcx_pin        = NRFX_SPIM_DCX_PIN;
    spi_config.use_hw_ss      = true;
    spi_config.ss_active_high = false;
    APP_ERROR_CHECK(nrfx_spim_init(&amp;amp;spi, &amp;amp;spi_config, spim_event_handler, NULL));

    NRF_LOG_INFO(&amp;quot;NRFX SPIM example started.&amp;quot;);
     MAX30003_Reg_Read( 0x21); 
	   MAX30003_Reg_Read( 0x25); 
	 
    while (1)
    {
        // Reset rx buffer and transfer done flag
        memset(m_rx_buf, 0, m_length);
        spi_xfer_done = false;

        APP_ERROR_CHECK(nrfx_spim_xfer_dcx(&amp;amp;spi, &amp;amp;xfer_desc, 0, 15));

        while (!spi_xfer_done)
        {
            __WFE();
        }

        NRF_LOG_FLUSH();

        bsp_board_led_invert(BSP_BOARD_LED_0);
        nrf_delay_ms(200);
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151474?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:35:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4880a62-99c2-4091-a93d-bc3daed963f1</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;From MAX30003 spec:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The device is programmed and accessed by a 32 cycle SPI instruction framed by a CSB low interval. The content of the SPI operation consists of a one byte command word (comprised of a seven bit address and a Read/Write mode indicator, i.e., A[6:0] + R/W) followed by a three-byte data word.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Read mode operations will access the requested data on the 8th SCLK rising edge, and present the MSB of the requested data on the following SCLK falling edge, allowing the µC to sample the data MSB on the 9th SCLK rising edge. Configuration, Status, and FIFO data are all available via normal mode read back sequences. If more than 32 SCLK rising edges are provided in a normal read sequence then the excess edges will be ignored and the device will read back zeros.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t SPI_TX_Buff[4]; // 32 bit transfers

void MAX30003_Reg_Read(uint8_t Reg_address)
{
    nrfx_err_t err_code = NRF_SUCSESS;

// nrf_gpio_pin_clear(NRFX_SPIM_SS_PIN); The driver should handle the SS pin automatically.

//Prepare the tx buffer
memset(SPI_TX_Buff[0], 0x00, sizeof(SPI_TX_Buff)); // Erases the buffer
memset(SPI_RX_Buff[0], 0x00, sizeof(SPI_TX_Buff)); // Erases the buffer
SPI_TX_Buff[0] = (Reg_address&amp;lt;&amp;lt;1 ) | RREG; // should be SPI_TXBuff[0], I assume RREG = 0x1;

//Create the transfer descriptor
nrfx_spim_xfer_desc_t xfer_desc4 = NRFX_SPIM_XFER_TRX(SPI_TX_Buff[0], sizeof(SPI_TX_Buff), SPI_RX_Buff[0], sizeof(SPI_TX_Buff));

//Initiate the transfer
err_code = nrfx_spim_xfer(&amp;amp;Your_SPIM_Instance, &amp;amp;xfer_desc4, 0);

// nrf_gpio_pin_set(NRFX_SPIM_SS_PIN); The driver should handle the SS pin automatically.
}

// When the SPIM event handler is called with the NRFX_SPIM_EVENT_DONE event, the SPI_RX_Buff[1] to 3 will contain the received data.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also, the first thing you&amp;#39;ll want to do is to read the INFO register in order to verify that your SPI protocol is working, however the MAXIM device requires you to read from or write to any other register before you can read the INFO register:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;INFO (0x0F) INFO is a read-only register that provides information about the MAX30003. The first nibble contains an alternating bit pattern to aide in interface verification. The second nibble contains the revision ID. The third nibble includes part ID information. The final 3 nibbles contain a serial number for Maxim internal use&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;—note that individual units are not given unique serial numbers, and these bits should not be used as serial numbers for end products, though they may be useful during initial development efforts. Note: due to internal initialization procedures, this command will not read-back valid data if it is the first command executed following either a power-cycle event, or a SW_RST event.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You should also scope the SPI communication with a digital logical analyzer. I suggest a Saleae Logic 8 or similar devices.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151455?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:254bc9f4-7464-4aef-a698-a738877f373e</guid><dc:creator>awneil</dc:creator><description>[quote userid="73307" url="~/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board/151444"] I have to read SPI transmit and SPI Receive.[/quote]
&lt;p&gt;That makes no sense!&lt;/p&gt;
&lt;p&gt;Transmit is what &lt;em&gt;&lt;strong&gt;you&lt;/strong&gt;&lt;/em&gt; send - so why do you need to read it??&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Use the &amp;#39;Insert Code&amp;#39; feature to get properly formatted source code in your post:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1538571876533v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151444?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 12:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a1068f6-a3e3-491f-b349-daf9e11a4a5b</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;Hi Haakonsh,&lt;/p&gt;
&lt;p&gt;Thank you for your suggestion, I am using nRFX_spim Example now.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have done REG read function for reading MAX30003ECG Register value, In function, I have to read SPI transmit and SPI Receive.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want to store Tx &amp;amp; Rx data in a CHAR_ARRAY but it is not storing in the &lt;strong&gt;SPI_temp_32b[i]. P&lt;/strong&gt;lease check it in below code&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;void MAX30003_Reg_Read(uint8_t Reg_address)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf_gpio_pin_clear(NRFX_SPIM_SS_PIN);&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; SPI_TX_Buff[1] = (Reg_address&amp;lt;&amp;lt;1 ) | RREG;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;// Please clarify below function correct or not //&lt;br /&gt;&lt;strong&gt; nrfx_spim_xfer_desc_t xfer_desc4 = NRFX_SPIM_XFER_TRX(SPI_TX_Buff[1], sizeof(SPI_TX_Buff[1]), SPI_RX_Buff, sizeof(SPI_TX_Buff[1]));&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;&lt;strong&gt; for ( i = 0; i &amp;lt; 3; i++)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; {&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; SPI_temp_32b[i]= NRFX_SPIM_XFER_TRX(A, sizeof(A), SPI_RX_Buff, sizeof(A));&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; }&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf_gpio_pin_set(NRFX_SPIM_SS_PIN);&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151209?ContentTypeID=1</link><pubDate>Tue, 02 Oct 2018 11:27:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2771ecfc-97b8-48b8-88e1-8bc53d5f42d1</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I suggest you start with the &lt;a title="nrfx SPI Master Example" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/nrfx_spim_example.html?cp=4_0_0_4_5_38"&gt;nrfx SPI Master Example&lt;/a&gt;&amp;nbsp;first, then if you want you can use the&amp;nbsp;&lt;a title="SPI Transaction Manager Example" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/nrf_spi_mngr_example.html?cp=4_0_0_4_5_40"&gt;SPI Transaction Manager Example&lt;/a&gt;. The transaction manager is just another layer of abstraction useful when dealing with multiple slaves with different SPI configurations on the same bus. If you&amp;#39;re only interfacing with this one sensor then there&amp;#39;s no need for the&amp;nbsp;&lt;a title="SPI transaction manager" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_nrf_spi_mngr.html?cp=4_0_0_3_48"&gt;SPI transaction manager&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Se also the&amp;nbsp;&lt;a title="SPI master" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/hardware_driver_spi_master.html?cp=4_0_0_2_0_13"&gt;SPI master&lt;/a&gt;&amp;nbsp;docs and&amp;nbsp;&lt;a title="SPIM" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrf__spim.html?cp=4_0_0_6_9_0_21"&gt;SPIM&lt;/a&gt;&amp;nbsp;API references.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/151189?ContentTypeID=1</link><pubDate>Tue, 02 Oct 2018 10:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b07347b-4cc5-4007-a5b9-e3ae78587a4e</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;Hello&amp;nbsp; sir sorry for that,&lt;/p&gt;
&lt;p&gt;may i know nrf&amp;nbsp;SPIM driver means &amp;quot;spi_master_using_nrf_spi_mngr&amp;quot; example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/150958?ContentTypeID=1</link><pubDate>Mon, 01 Oct 2018 12:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c93c610-0eae-42e8-bbcc-4fdba0260148</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Rohit,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Either you answer the questions asked by Nordic staff or community members &lt;strong&gt;or&lt;/strong&gt; you wont get any help from us. We can only help you help yourself. If you do not want our help please&amp;nbsp;refrain from using our forum. It will not help you to keep posting the same question in new threads without engaging in any conversation in your ongoing thread:&lt;br /&gt;&lt;br /&gt;See the public duplicates:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39021/max30003-ecg-with-nrf52840"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/39021/max30003-ecg-with-nrf52840&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39063/spi-communication-with-max30003-ecg-reg_read_write"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/39063/spi-communication-with-max30003-ecg-reg_read_write&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have got a few tips for your current project:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Remove and forget any arduino drivers, they are not suited for any other platforms than arduino.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Use Maxims drivers.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&amp;#39;s an abstract architecture of your FW with regards to the MAX30003:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-8d8bceaff3784224898c44302ee0a682/FW_5F00_abstract_5F00_architechture.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Good luck,&lt;/p&gt;
&lt;p&gt;Håkon H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840-DK with MAX30003 ECG Board</title><link>https://devzone.nordicsemi.com/thread/150268?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 12:58:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6737d4da-01ae-4350-895a-10491112b9ad</guid><dc:creator>awneil</dc:creator><description>[quote userid="73307" url="~/f/nordic-q-a/38874/nrf52840-dk-with-max30003-ecg-board"]I need some help for Driver Development[/quote]
&lt;p&gt;What &amp;quot;help&amp;quot;, exactly, do you need?&lt;/p&gt;
&lt;p&gt;What have you tried?&lt;/p&gt;
&lt;p&gt;Where are you stuck?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>