Problems with arduino due's Native Port


I have just bought one arduino due from Amazon.

I successfully programmed the due with simple codes such as binking LED etc. I was using Programming port at that time.

Now I want to see the Due's performance with Native port. I tried programming the Native port but as soon as the sketch gets uploaded the COM port of my due changes. IDE does not even recognize that it is Due's Native port as it is not mentioned under the ports tab of tools. (Before uploading the sketch, it was mentioned)

Also even if I use SeriaUSB class, I can not see anything printing on the serial monitor.

What seems to be the problem??

Please help!!

Can you post the code?

Here is the code that I am trying to run.

I want to see sampling rate of ADC through the native port.

int analogPin = A0;

int val = 0;
float eVal;
long t1;
int frequency = 0;

void setup()


while (!SerialUSB) {


void loop()

val = analogRead(analogPin);
SerialUSB.print("frequency = ");

SamplingRate.ino (456 Bytes)

There seems to be a driver issue, I have just spent an hour fiddling with a combination or erase/reset and drivers. Your code works.
The final thing I did before it worked was to go to the arduino drivers folder and install arduino.inf. Thing is, I had no issue 2 weeks ago when I was last playing with my Dues, I haven't even rebooted since then! I've had this sort of problem a few times now with the Due native port, it's starting to really piss me off :frowning: