how to get the 1Msps in Due

thanks for the code, it is a little long, the code I found is short and simple and it seems to be working.

I am not sure if I understand it well but I need to make a call to ADC_Handler() withing the loop() to take one 1 us reading. it is a little complicated to understand it right away, I am not so good.