chipKIT® Development Platform

Inspired by Arduino™

[RESOLVED] Runtime on UART

Created Sun, 25 Mar 2012 13:39:24 +0000 by sfeltan


sfeltan

Sun, 25 Mar 2012 13:39:24 +0000

Hi all,

I would like to know if there's a way to display the run time on uart? I need to play with time constraints and I don't have any scope. Thus, I would like to display runtime for each print in order to debug my code. Is this feasable?

Regards

Laurent


Jacob Christ

Thu, 29 Mar 2012 07:01:39 +0000

tempcore = ReadCoreTimer(); MySerial.print(tempcore,DEC);

ReadCoreTimer() returns a 32 bit tick timer value increases at a rate of 40MHz for a 80MHz part. I think it overflows about every 107.3741824 (2^32 / 40MHz) seconds.

Jacob


sfeltan

Thu, 29 Mar 2012 11:18:41 +0000

Works fine! Thank's a lot