Skip to content

Commit

Permalink
Check VTOR set is successful. Catches M0 without VTOR.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed May 16, 2024
1 parent 7a22572 commit 660e0f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions teleprobe/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ impl Runner {
// Write VTOR
// NOTE this DOES NOT play nice with the softdevice.
core.write_word_32(0xE000ED08, vector_table.location)?;
let got_vtor = core.read_word_32(0xE000ED08)?;
if got_vtor != vector_table.location {
panic!(
"failed to set VTOR! got {:08x} want {:08x}",
got_vtor, vector_table.location
)
}

// Hacks to get the softdevice to think we're doing a cold boot here.
//core.write_32(0x2000_005c, &[0]).unwrap();
Expand Down

0 comments on commit 660e0f2

Please sign in to comment.