I'm struggling to get any valid readings from a CTMU module on the PIC24EP512GP202 below is the code i am using i struggled to do the current calibration as well and i am wonder if perhaps there is an issue with the way i setup the ADC or perhaps something wrong with the CTMU on this particular chip itself

Just In case anyone ever has the same issue, below was my solution.
I had the following two issues.

The ADC pin connected to the CTMU module needs to be disconnected from any breadboard or connection. (i actually ended up just buying the microstick dev kit and removing the AN0 pin from the breadboard)

There is a fair amount of current leakage whilst waiting for the signal to arrive, but after both edgestats are set high the leakage is not an issue. For my real time measurements i used the timer to count 1ms and discharge the cap and reset the ctmu. This particular chip cannot work with the "CHOSA=31" which is the "open connection".

The best resolution i could achieve has so far been around 200ps with a very stable repeatable measurement. I am however still working on the input buffer circuit to confirm this with external pulses.

My code below was used for software testing of the CTMU, comments are probably all wrong since i was doing a lot of trial and error

Code (Text):

void CtmuTimeConfigAutoADC(void)

{

// Step 1 Configure the CTMU

CTMUCON1 = 0x0000; // Disable CTMU

CTMUCON1bits.TGEN = 0; // Disable Time Generation mode

CTMUCON1bits.EDGEN = 0; // Edges are enabled

CTMUICONbits.ITRIM = 0; // Set trim

CTMUICONbits.IRNG = 2; // set high bit of range

CTMUCON1bits.CTTRIG = 1;

ANSELA=0x0003; // use only AN0-AN1 as analog

ANSELB=0x0000; // use only AN2 - AN3 (RB0,RB1) as analog

// input pins

TRISAbits.TRISA0 = 1; // Set channel 2

ANSELAbits.ANSA0 = 1; // Make AN0 as analog (Resistor is connected to this pin)