I made sure the PLL cap was a NP0 type and added 10µF decoupling to the analog supply of the MAX30003 with no improvement. This project has been dragging on for too long, so it's time to cut the losses and move on. A little summary won't hurt, though:
- Sampling real time data to the microcontroller's RAM and, upon button
push, store the entire RAM buffer to a file on the external flash file system
- Using the STM32 with external flash as an USB mass storage device to access saved files (or any files!)
- Runtime: approx a week on a single CR2032 cell
- Silicone casing is smooth!
What doesn't work:
- The readings from the MAX30003 swing from rail to rail and makes no sense
- The smoke escapes from the 3.3V LDO when there's no USB power... Seems like reverse conditions don't make these things happy!
- The MCU is unsuccessful in recovering fully from deepest STOP mode
- Tiny components in packed spaces are a bitch to patch and rework
- Don't do hard to hand solder SMD components on the backside of PCBs in hobby projects with hobby tools
- Include reset pin on debug connector if you plan on using sleep modes...
- Segger has some truly excellent debugging software
... and lastly:
- Ease down on scope on simple hobby projects, don't introduce too much new or tricky stuff or it's gonna be hard to keep up momentum, and as a result, motivation will suffer.