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) {
28
28
void loop () {
29
29
uint64_t start, stop;
30
30
31
- start = rp2040.getCycleCount ();
31
+ start = rp2040.getCycleCount64 ();
32
32
for (int i = 0 ; i < 1000 ; i++) {
33
33
memcpy (dest, src, 4 * 1024 );
34
34
memcpy (src, dest, 4 * 1024 );
35
35
}
36
- stop = rp2040.getCycleCount ();
36
+ stop = rp2040.getCycleCount64 ();
37
37
verify (" CPU" , src);
38
38
verify (" CPU" , dest);
39
39
Serial.printf (" CPU: %lld clock cycles for 4K\n " , (stop - start) / 1000 );
40
40
41
- start = rp2040.getCycleCount ();
41
+ start = rp2040.getCycleCount64 ();
42
42
for (int i = 0 ; i < 1000 ; i++) {
43
43
rp2040.memcpyDMA (dest, src, 4 * 1024 );
44
44
rp2040.memcpyDMA (src, dest, 4 * 1024 );
45
45
}
46
- stop = rp2040.getCycleCount ();
46
+ stop = rp2040.getCycleCount64 ();
47
47
verify (" DMA" , src);
48
48
verify (" DMA" , dest);
49
49
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