Hello All.
Could anybody tell me how?
I use DevKitC, and I hope 240MHz.
Thank you.
How to confirm core freq
Re: How to confirm core freq
Thank you people, I've got it using a code shown below.
register uint32_t t0, t;
register uint32_t n = 64000;
register uint8_t* pdata = new uint8_t[n];
uint32_t usec0 = micros();
asm volatile ("rsr %0, ccount" : "=r"(t0));
register uint32_t k = 0;
for(; k < n; k++) {
pdata[k] = (uint8_t)((*preg >> 11) & 0xff);
}
asm volatile ("rsr %0, ccount" : "=r"(t));
uint32_t usec = micros();
delete [] pdata;
printf("%u (%u, %u)\n", t - t0, t0, t);
printf("%u (%u, %u) usec\n", usec - usec0, usec0, usec);
register uint32_t t0, t;
register uint32_t n = 64000;
register uint8_t* pdata = new uint8_t[n];
uint32_t usec0 = micros();
asm volatile ("rsr %0, ccount" : "=r"(t0));
register uint32_t k = 0;
for(; k < n; k++) {
pdata[k] = (uint8_t)((*preg >> 11) & 0xff);
}
asm volatile ("rsr %0, ccount" : "=r"(t));
uint32_t usec = micros();
delete [] pdata;
printf("%u (%u, %u)\n", t - t0, t0, t);
printf("%u (%u, %u) usec\n", usec - usec0, usec0, usec);
Who is online
Users browsing this forum: No registered users and 75 guests