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

bare7

parent e39be084
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,14 @@ version = "0.2.0" ...@@ -34,6 +34,14 @@ version = "0.2.0"
git = "https://github.com/jsjolund/f4" git = "https://github.com/jsjolund/f4"
version = "0.1.0" 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] [features]
wcet_bkpt = [] wcet_bkpt = []
wcet_nop = [] wcet_nop = []
......
No preview for this file type
...@@ -59,6 +59,7 @@ fn clock_out(rcc: &mut RCC, gpioc: &mut GPIOC) { ...@@ -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) // otyper reset state push/pull, in reset state (don't need to change)
// ospeedr 0b11 = high speed // ospeedr 0b11 = high speed
// ospeedr 0d00 = low speed
gpioc gpioc
.ospeedr .ospeedr
.modify(|_, w| unsafe { w.ospeedr9().bits(0b11) }); .modify(|_, w| unsafe { w.ospeedr9().bits(0b11) });
......
...@@ -48,7 +48,7 @@ fn init(p: init::Peripherals) { ...@@ -48,7 +48,7 @@ fn init(p: init::Peripherals) {
let _ = serial.write(byte); let _ = serial.write(byte);
} }
Err(err) => { 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 p.USART2.dr.read(); // clear the error by reading the data register
} }
} }
...@@ -89,9 +89,10 @@ fn idle() -> ! { ...@@ -89,9 +89,10 @@ fn idle() -> ! {
// (just send the characters not the single quotes and commas) // (just send the characters not the single quotes and commas)
// what did you receive, and what was the output of the ITM trace // what did you receive, and what was the output of the ITM trace
// ** your answer here ** // ** your answer here **
// // a b c d it echo emidtly. //
// why did the transmission fail? (hint, think about timing...) // why did the transmission fail? (hint, think about timing...)
// ** your answer here ** // ** 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) // commit your answers (bare7_1)
// //
...@@ -99,6 +100,8 @@ fn idle() -> ! { ...@@ -99,6 +100,8 @@ fn idle() -> ! {
// 'a', 'b', 'c', 'd', 'e' character by character // 'a', 'b', 'c', 'd', 'e' character by character
// what did you receive, and what was the output of the ITM trace // what did you receive, and what was the output of the ITM trace
// ** your answer here ** // ** your answer here **
// "ok [96,97,98,99]
// repit ...
// //
// if done correctly you see an evedince of Rust's memory safety // if done correctly you see an evedince of Rust's memory safety
// the buffer will be saturated (all elements occupied) // the buffer will be saturated (all elements occupied)
......
/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