Skip to content
Snippets Groups Projects
Commit cfa80eca authored by Samuel Karlsson's avatar Samuel Karlsson
Browse files

bare7

parent e39be084
Branches
No related tags found
No related merge requests found
......@@ -34,6 +34,14 @@ version = "0.2.0"
git = "https://github.com/jsjolund/f4"
version = "0.1.0"
[dependencies.heapless]
git = "https://github.com/japaric/heapless.git"
version = "0.2.1"
[dependencies.nb]
git = "https://github.com/japaric/nb.git"
version = "0.1.1"
[features]
wcet_bkpt = []
wcet_nop = []
......@@ -44,4 +52,4 @@ debug = true
[profile.dev]
codegen-units = 1
incremental = false
\ No newline at end of file
incremental = false
No preview for this file type
......@@ -59,6 +59,7 @@ fn clock_out(rcc: &mut RCC, gpioc: &mut GPIOC) {
// otyper reset state push/pull, in reset state (don't need to change)
// ospeedr 0b11 = high speed
// ospeedr 0d00 = low speed
gpioc
.ospeedr
.modify(|_, w| unsafe { w.ospeedr9().bits(0b11) });
......
......@@ -48,7 +48,7 @@ fn init(p: init::Peripherals) {
let _ = serial.write(byte);
}
Err(err) => {
ipln!("Error {:?}", err);
ipln!("Error {:?}: the bufer overflows. Type slower", err);
p.USART2.dr.read(); // clear the error by reading the data register
}
}
......@@ -89,9 +89,10 @@ fn idle() -> ! {
// (just send the characters not the single quotes and commas)
// what did you receive, and what was the output of the ITM trace
// ** your answer here **
//
// a b c d it echo emidtly. //
// why did the transmission fail? (hint, think about timing...)
// ** your answer here **
// it is set to 8 byte som it sent 1 charakter att the time and ther for is the echo per charakter
//
// commit your answers (bare7_1)
//
......@@ -99,7 +100,9 @@ fn idle() -> ! {
// 'a', 'b', 'c', 'd', 'e' character by character
// what did you receive, and what was the output of the ITM trace
// ** your answer here **
//
// "ok [96,97,98,99]
// repit ...
//
// if done correctly you see an evedince of Rust's memory safety
// the buffer will be saturated (all elements occupied)
// but no buffer owerwrite will occur (outside the buffer)
......
/dev/ttaACM0
115200
8
1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment