I've downloaded your repo, and will see if I can duplicate the strange behavior of the M. My understanding has always been that both versions reset the timing chain when the seconds register is written to. But I've always thought that the M oscillator is running at a much higher frequency, and is not changed by temp and aging adjustments, and that only the down counter reset value is changed. If that's the case, then perhaps it's just loading in the wrong value on a reset, or a value intended to compensate for known delays, such as the I2C transmit time.
The SN is clearly superior, but I wonder if even they are now mostly counterfeit. I can't explain the cost of the modules from China as compared to what Digikey sells the bare chips for, even in volume.
At the risk of going too far off topic, a couple questions:
Are you aware of the high-sleep-current problem (140uA or so) on "The Simple" Pro Minis caused by counterfeit processors?
Did you ever consider having the RTC control the power to the MCU and the sensors instead of generating an interrupt? In other words, having the INT output of the RTC switch a P-channel mosfet that provides power to the rest of the circuit?
Estimating from the number of loggers that simply wont go below 100uA, I'd say about 1 in 40 of those cheap clone Pro Mini's has one of those fake 328p chips that wont sleep properly. It's annoying, but only a few minutes for me to replace. Sometimes I keep them anyway for accelerated battery burn tests which I usually do around 100uA sleep.
There were time related issues with full reboot so I did not bother putting a power mosfet on the SQW alarm. Waiting for the boards oscillator to spin up from powerdown sleep takes 2msec, and even that amount of time gets pretty annoying with sensors that generate interrupts. Most two part loggers sleep around 1-2uA, which is not far from coincells self-discharge. So we are already past a couple of years runtime on a name brand cell which means memory is almost always the primary constraint on runtime. But if I had to use those 100uA sleepers, I'd go for the mosfet power control to extend runtime.
Have you found a reliable source for cheap Pro Minis that sleep at the right current? Or is it hit or miss no matter where you buy? Actually, I don't care if the chips are fake so long as they behave.
Also, have you ever used Kevin Darrah's sketch to test for fake 328Ps?
ttps://www.youtube.com/watch?v=eeDC1m7ANJI
I think that "cheap" and "sleep at the right current" don't go hand-in-hand, especially nowadays. It's the risk you take.
I don't think that's necessarily true. Of course there's always the genuine Sparkfun Pro Mini, but they are $11 plus shipping. But in the past I've bought cheap ones that worked fine. I was just hoping to find a reliabe source for well-behaving ones, even if they are fakes.