Hi Erich,
I'm trying to investigate further.
I simplified my code in order to test only the timer.
Here's what I do:
uint32_t delta;
uint32_t max = 0;
uint32_t min = 0xFFFFFFFF;
LPC4370_InitCycleCounter();
while(1)
{
LPC4370_ResetCycleCounter();
LPC4370_EnableCycleCounter();
LPC_GPIO_PORT->B[DEBUGPIN_PORT][DEBUG_PIN1] = TRUE;
LPC_GPIO_PORT->B[DEBUGPIN_PORT][DEBUG_PIN1] = FALSE;
delta = LPC4370_GetCycleCounter();
if(delta < min)
{
min = delta;
}
if (max < delta)
{
max = delta;
}
}
So, If I run It for a while what I get is:
max = 2450 (~12us if running at 204 MHz)
min = 22 (~100ns if running at 204 MHz).
Here's also a pic of my scope and my setup:


I noticed that this 2450 value happens just at the very beginning and then no more.
Do you have a hint about why I don't get consistent measurements?
Best,
Andrea