Hi. I'm the [Chris C] that [Rasz] copied my Hackaday post from.
Let me start out by providing a little context. This thread was used in the Hackaday thread as a specific example of how poor tech support can be. And yes, it's disappointing, not just for Microchip but for most vendors. But sometimes they get an unnecessarily bad rap, considering what they have to contend with. There's been four times I was absolutely certain I found fault in Microchip's product, proceeded to give tech support holy hell about it, and only one time I was right. My post was written generally and with playing devil's advocate in mind, and it was only once I was done that I realized [RossS] should really see it. So I asked [Rasz] to pass it along, which he kindly did, since I wasn't a member here.
But after realizing it could be read out of context, I went ahead and signed up. [RossS], no slight was meant or directed at you. And after seeing how various people analyzed what I said, I agree with [Howardlong] that what I said should be clear, may have been clear to me, but not to others.
So let me demonstrate how I determined this. From the main datasheet:
10.5 VBAT Mode
The power supplied on VBAT only runs two systems: the RTCC and the Deep Sleep Semaphore registers (DSGPR0 and DSGPR1). To maintain these systems during a sudden loss of VDD, it is essential to connect a power source, other than VDD or AVDD, to the VBAT pin.
When the RTCC is enabled, it continues to operate with the same clock source (SOSC or LPRC) that was selected prior to entering VBAT mode. There is no provision to switch to a lower power clock source after the mode switch.
Everything is shut down, except for the listed exceptions, and those that immediately follow:
10.5.3 I/O PINS DURING VBAT MODES
All I/O pins switch to Input mode during VBAT mode. The only exceptions are the SOSCI and SOSCO pins, which maintain their states if the Secondary Oscillator is being used as the RTCC clock source.
Here is the first place where one might misinterpret the terminology. "Input mode" in the context of Microchip's MCUs means tristated, and high-impedance. It does not imply that any MCU peripheral actually be attached to the pin, and capable of receiving input, including the digital input buffers. Since the digital input buffers were not in any listed exception, one must conclude they are shut down.
But the SOSCI and SOSCO pins were listed, you say? Second possible misinterpretation. To run the RTCC from an external clock:
"Ensure that the SCLKI pin is made a digital input while using this configuration (see Table 11-1)."
Notice how this is worded - SCLKI pin. And by pin, it means a functional pin, not a physical pin. Multiple functional pins share a fewer number of physical pins. Even though SOSCO and SCLKI share a physical pin, saying that SOSCO remains functional, does not mean that SCLKI does!
There is one further possibility that would allow [RossS]'s desired mode of operation. Perhaps SCKLI doesn't use the generic digital input buffers, but instead has a separate and dedicated digital input buffer; which is a part of SOSC, and would therefore remain functional in Vbat mode. But none of quoted documentation supports this possibility, so any assumption that it works like this is unwarranted. If any question remains, one might refer to Figure 9-1, the functional diagram for the clock. I personally prefer referring to functional diagrams over text, as they describe functionality far more succinctly than any text possibly can. The functional blocks for SOSC are shown and outlined. SCLKI is not represented, nor any circuitry that could support it. That should conclude the issue beyond any doubt. SCKLI is separate from SOSC, depends on the generic digital input buffers to function, and will not work in Vbat mode.
[RossS], if you really want to drive the RTCC from an external clock source while in Vbat, I'm fairly certain you can. Don't use SCLKI, turn on SOSC and use it as the clock. Your external clock source will need to be low enough impedance to override the signal from the inverter shown in the functional diagram. The output from that inverter is almost certainly limited at a low current, and tolerates "short circuiting" with a different signal without issue. If you want to be absolutely sure no damage results, initially attach the external clock through a high value resistor. Lower it until it starts to work. Then lower it a little more to allow for resistor/MCU/other tolerances, I'd go with 25%.
Hope this has been helpful.