Thanks
I don't evaluate SysTick in terms of 1ms.
I have tested SysTick for 15 times reading.
Result was sense :
first reading 5tick +14*3tick=47ticks
and elapsed time for reading is small enough for 1ms.
I added serial.println after finished reading.
The same reading process increase 121tick.??
volatile uint32_t t0, t1, t3;
void setup() {
Serial.begin(250000);
}
void loop() {
uint32_t i,A[2000],t0,t1,*a=&A[0];
noInterrupts();
t0 = SysTick->VAL;
// Do some stuff during less than 1 ms, e.g. :
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//5ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
*a++ = PIOD->PIO_PDSR & 0B00000000000000000000000011111111;//3ticks
//total=5+3*14=47ticks
t1 = SysTick->VAL;
t3 = ((t0 < t1) ? 84000 + t0 : t0) - t1 - 2 ;
interrupts();
for(i=0;i<14;i++){Serial.println(A[i] );}
Serial.print("number of ticks: ");
Serial.println(t3 );
delay(1000);
}