diff --git a/examples/rtt_timing.rs b/examples/rtt_timing.rs index 96bf43a608a070dde3ba04d5b8afa501bd2bf2e5..55ea8c8783bdda3dbf9e6dcaf514ae44833dbf29 100644 --- a/examples/rtt_timing.rs +++ b/examples/rtt_timing.rs @@ -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: