From 440092741f6ef42f9a397e86e65bdc64ce771ab2 Mon Sep 17 00:00:00 2001 From: Ridgep <ridpet-5@student.ltu.se> Date: Wed, 13 Mar 2019 15:31:09 +0100 Subject: [PATCH] bare10_1 --- examples/bare10.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/bare10.rs b/examples/bare10.rs index 5d3882e..5629764 100644 --- a/examples/bare10.rs +++ b/examples/bare10.rs @@ -83,9 +83,9 @@ const APP: () = { fn trace_data(byte: u8) { let stim = &mut resources.ITM.stim[0]; iprintln!(stim, "data {}", byte); - // for _ in 0..10000 { - // asm::nop(); - // } + for _ in 0..10000 { + asm::nop(); + } } #[task(priority = 1, resources = [ITM])] @@ -145,15 +145,17 @@ const APP: () = { // // Did you loose any data (was the data correctly echoed)? // -// ** your answer here ** +// The data was all sent, and recieved. // // Was the data correctly traced over the ITM? // -// ** your answer here ** +// No, it got a RingBufferOverflow on the third and forth byte. // // Why did you loose trace information? // -// ** your asnwer here ** +// This is due to the loop that we have implemented in the trace function, +// we are running the loop and it's building up our buffer memory to the point that it overflows +// when we are trying to read the third and forth byte. // // Commit your answers (bare10_1) // -- GitLab