File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libraries/rp2040/examples/DMAMemcpy Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,22 @@ void verify(const char *name, uint32_t *src) {
2828void loop () {
2929 uint64_t start, stop;
3030
31- start = rp2040.getCycleCount ();
31+ start = rp2040.getCycleCount64 ();
3232 for (int i = 0 ; i < 1000 ; i++) {
3333 memcpy (dest, src, 4 * 1024 );
3434 memcpy (src, dest, 4 * 1024 );
3535 }
36- stop = rp2040.getCycleCount ();
36+ stop = rp2040.getCycleCount64 ();
3737 verify (" CPU" , src);
3838 verify (" CPU" , dest);
3939 Serial.printf (" CPU: %lld clock cycles for 4K\n " , (stop - start) / 1000 );
4040
41- start = rp2040.getCycleCount ();
41+ start = rp2040.getCycleCount64 ();
4242 for (int i = 0 ; i < 1000 ; i++) {
4343 rp2040.memcpyDMA (dest, src, 4 * 1024 );
4444 rp2040.memcpyDMA (src, dest, 4 * 1024 );
4545 }
46- stop = rp2040.getCycleCount ();
46+ stop = rp2040.getCycleCount64 ();
4747 verify (" DMA" , src);
4848 verify (" DMA" , dest);
4949 Serial.printf (" DMA: %lld clock cycles for 4K\n\n\n " , (stop - start) / 1000 );
You can’t perform that action at this time.
0 commit comments