Skip to content
Snippets Groups Projects
Commit 904deee8 authored by Edvin Åkerfeldt's avatar Edvin Åkerfeldt
Browse files

rtt_timing: Added task D, as notet in reviews

parent 416e4898
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,18 @@ A/C = 4790151/40001 = 119,7507812 ~= 120
// Open the file in you editor and search for the `timed_loop`.
//
// [Assembly for function `timed_loop` here]
/*
08000232 <timed_loop>:
8000232: movw r1, #4100 // Load 4100 into r1 (16-bit register)
8000236: movw r2, #10000 // Load 10000 into r2 (16-bit register)
800023a: movt r1, #57344 //
800023e: ldr r0, [r1] // Load the content of E0001004 (probably the DWT register) into r0
8000240: subs r2, #1 // Decreases the loop counter with one
8000242: nop // The instruction of the loop
8000244: bne #-8 <timed_loop+0xe> // Branch not equal, two instructions back
8000246: ldr r1, [r1] // Load the content of E0001004 into r1, no ide why
8000248: bx lr // Branch back to link
*/
//
// Locate the loop body, and verify that it makes sense
// based on the information from the technical documentation:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment