MAX30003-NRF52832 SPI Interface - No proper data read back from the Slave(MAX30003)

I am interfacing MAX30003 with Nordic NRF52DK (NRF52832 SOC). The Nordic successfully generates SPI CLK and writes the register data to the MOSI pin. But, the MAX30003WING board mostly does not respond to the read operation for the same registers that are previously written to. Sometimes, I do get values from in the MISO pin but not reliable. The ECG data obtained from the FIFO buffer is also irregular (does not represent the input ECG Signal fed from the wave generator). I get random ECG data irrespective of the input signal I provide. 

SETUP DETAILS

SCLK - 4MHz(also tested 125KHz)

MAX30003         NRF52DK

SCLK                     p0.04

MOSI                     p0.03

MISO                     p0.31

3.3V                       VDD

GND                      GND

MAX30003 INPUT LEADS

Red(Tip) - Positive of Generator

White(Ring) - Negative of Generator

Black(Sleeve) - Common GND of NRF52DK & MAX30003

SPIM Library used  : NRFX SPIM 

INPUT WAVE PARAMETERS

Number of samples : 450

Sampling rate          : 450 Sa/s

Tested Amplitude     : 1mvpp - 50 mvpp

offset                        : 0

MAX30003WING.pdf

ADDITIONAL NOTE

PLL Interrupt is thrown in the beginning before writing 0 to SYNC register and during ECG Buffer read operation. In the event of PLL Interrupt, I spin check the PLL interrupt flag in the status register until it is cleared. Also. I have attached the main.c file, design document that has the setup information and output sample log file for reference. 

4861.main.pdfECG_SAMPLES - Sheet1.pdf

Parents
  • Hello,

    I would have connected a logic analyzer and looked at the 4 spi pins (clk, miso, mosi, and ssel (ssel must go active low during each transfer)), and also made sure vdd and gnd is properly connected between the boards. You could potentially disconnect the miso pin, just to check if it's possible something on the dk is forcing it low.

    Kenneth

Reply
  • Hello,

    I would have connected a logic analyzer and looked at the 4 spi pins (clk, miso, mosi, and ssel (ssel must go active low during each transfer)), and also made sure vdd and gnd is properly connected between the boards. You could potentially disconnect the miso pin, just to check if it's possible something on the dk is forcing it low.

    Kenneth

Children
  • Hi Kenneth,

    Appreciate your timely response. The SSEL is controlled by the NRFX_SPIM library and it does get driven to zero for each spim transaction. I already attached a pdf titled "MAX30003WING" which has the logic analyzer waveforms for looped write and read operation. I kindly request you to take a look at it. 

    1. From the Logic Analyzer waveforms, its inferred that Nordic sends out data correctly for each transaction but the slave(MAX30003WING) does not respond with the data. I have tried the same with new MAX30003WING board as well. Moreover, the MISO line gets a single pulse for every transaction that has a width lesser than the SCLK's high period.

    2. As a debugging step, I established SPI Communication between two Nordic 52DK boards one being the slave and other being the master. The data is received successfully on both ends. But, again there are some additional pulses in the MISO line for no reason. I have attached the logic analyzer output for that as well. The MISO line in configured with NOPULL in nrf library. With that config, the MISO line was high by default. So, I configured it to PULLDOWN

    3. I also tried to add a delay of 100ms after each SPI transaction to give MAX30003WING sufficient time to do its internal operations and spun a while loop to wait until each SPI transactions calls DONE EVENT. But, nothing seems to read back the registers of MAX30003 successfully.

    Nordic-Nordic - NO MISO PULL

    Nordic as Both Master & Slave - MISO_NO_PULL

    Nordic - Nordic - MISO PULL DOWN

    Thanks,

    Srinidhi

  • Waveform assignments are not correct in the scope. The readback on Register #0 is undefined according to datasheet.

    SPI operation looks normal to me, ticket can be closed - nothing wr0ng on nordic side.

Related