Close

Nonsensical data and an unlockable PLL

A project log for Heartbeat Logger

A portable device that logs a snippet of your heart at the push of a button.

Ole Andreas UtstumoOle Andreas Utstumo 02/10/2020 at 00:100 Comments

There is this slightly tiny issue where all the logged data makes no sense. A bit unfortunate for a data logger, yes, and one that's a bit harder to debug when dealing with a integrated circuit and not discrete components as previuously.

After clearing away the metadata the logged data looks like this, electrodes attached or not:

Just something that looks like a saturated signal going from rail to rail in a random fashion. I've verified the SPI transmissions with a logic analyzer so there's nothing wrong with the way data is handled, it's all fine there.

The 1.8V supply is stable with only 3.3mV of digital ripple:

Looking at the PCB design I cannot see any impedance or noise issues with the ground plane either. In addition, the MCU is basically sleeping when the front end is sampling data from the amplifiers..

All registers are at default value, ECG channel is ON, sync register is cleared, the only thing reported in the logged metadata is FIFO END (but no overwritten values). Thinking it was some impedance or cross talk issue at the inputs I disconnected the inputs internally using the OPENP and OPENN bits in the CNFG_EMUX register, but with the same results..

Reading from the MAX30003's status register might give us a slight clue, though: The PLL lock bit never clears from it's position, meaning the device never reaches a stable clock.


The internal clock of the MAX30003 is generated from the incoming 32.768kHz clock from the STM32's crystal driven LSE clock:

We can check the incoming clock for jitter:

A closer look at one period's worth of jitter:
So we have a period of ~30.5us +/- 0.2% which doesn't seem like too much, but I'm afraid my knowledge falls short here..

A cause for the PLL issue might be the PLL capacitor which may or may not be a C0G / NP0.. If that's not it, I'm out of ideas, and to be honest, I'll also be out of motivation to dig further into the issue. It's been a cool little project, but to be honest there's nothing too interesting about it to warrant more hours sunk into it.. I'll order some new caps and give it one last shot before I shelve the project and move on.

Discussions