I see that in the ARM reference in the previous link that all the DWT values are 32-bits based on the address jump between each item, 4 bytes.
And just for kicks, I wanted to prove to myself that 64-bit integers actually exist. Here's a sketch to count overflows using a modulo detection scheme. With a divisor of 0x100'0000, ctr2 is 256 and 0x1000'0000 gives a value of 16. However, you can't print a 64-bit value with the Serial function as it's not one of the allowed input types.
Code:
// Test a 64-bit integer to see if it works
uint64_t ctr1 = 0;
uint16_t ctr2 = 0;
#define TEENSY_DELAY 3000 // Serial port does not start immediately
#define BAUD 115200 // How fast the port will output
#define LED_PIN 13 // My blinker
void setup()
{
Serial.begin( BAUD );
while ( !Serial && ( millis() < TEENSY_DELAY ) ); // Wait for serial connect
pinMode( LED_PIN, OUTPUT );
digitalWriteFast( LED_PIN, LOW );
}
void loop()
{
// Run the loop for the full range of a 64-bit value
for( uint64_t i = 0; i <= 0xffff'ffff; i++ )
{
ctr1++;
if( ctr1 % 0x100'0000 == 0 ) // Check for lower order overflow
{
// Toggle LED at each overflow
digitalWriteFast( LED_PIN, !digitalReadFast( LED_PIN ) );
ctr2++; // Count overflows
}
}
Serial.println( ctr2 ); // Proof
while( 1 ) {}; // Stall
}