Hello,
Do you also enter stop 2 mode? If so, the external clock cannot be used for the RTI; only the internal 1kHz oscillator is available. This must be explicitly enabled for it to continue operating in stop mode. However, the internal oscillator is not available in normal run mode, so the external clock must then be used for the RTI. This is one of the pecularities of the device.
If you are connecting a crystal as the external clock, the bit ICGC1_REFS must be set for the XTAL output pin to be available, for the crystal to oscillate.
Regards,
Mac