A processor such as a DSP, microprocessor, microcontroller or controller in accordance with the present invention may perform, for example, various morphology detection functions in sensed and/or stored electrograms (EGM's), such as differentiation of retrograde P-waves from antegrade P-waves; differentiation of P-waves from far field R-waves (FFRW); differentiation of atrial fibrillation (AF) or