Skip to content

STM32 based exercises#302

Open
jonathanpallant wants to merge 7 commits into
mainfrom
stm32-exercises
Open

STM32 based exercises#302
jonathanpallant wants to merge 7 commits into
mainfrom
stm32-exercises

Conversation

@jonathanpallant

Copy link
Copy Markdown
Member

Adding some exercises for the STM32 NUCLEO-U5A5ZJ board.

Unlike the nRF52840-DK we normally use, this board has a Cortex-M33 and supports TrustZone.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploying ferrous-systems-rust-exercises with  Cloudflare Pages  Cloudflare Pages

Latest commit: b1086c3
Status: ✅  Deploy successful!
Preview URL: https://684a4309.ferrous-systems-rust-exercises.pages.dev
Branch Preview URL: https://stm32-exercises.ferrous-systems-rust-exercises.pages.dev

View logs

@jonathanpallant
jonathanpallant force-pushed the stm32-exercises branch 3 times, most recently from 1c0cdce to 6d0a08e Compare July 22, 2026 10:50
@jonathanpallant
jonathanpallant marked this pull request as ready for review July 22, 2026 10:53
@jonathanpallant jonathanpallant changed the title Draft: STM32 based exercises STM32 based exercises Jul 22, 2026
Comment thread exercise-book/src/stm32/preparation.md Outdated

## Secure Watermark

Another part of the option bytes controls the "Secure Watermark" - that is, which pages in Flash are readable from Nonsecure mode.

@skade skade Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT. Is it "Nonsecure Mode" or "nonsecure mode"? Unsure about my English skills here though.

@@ -0,0 +1,237 @@
# Changing to Nonsecure Mode

We got secure-mode running in the previous chapter. But we also want to run a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: secure-mode, nonsecure mode...

* Call the BSP function to program the SAU.
* Call the BSP function to program the Global TrustZone Controller's Memory
Protection Controller for SRAM3
* Use the `cortex-m` library function to bootstrap the Nonsecure application

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Nonsecure


No!

The point of TrustZone is to keep things in Secure mode (like encryption keys) a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The paragraph above capitalises both: "Secure Mode", same with "Nonsecure Mode".

secret from Nonsecure mode (which might get hacked when processing untrusted
input).

Secure mode has is more trusted, and has more permissions that Nonsecure mode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

I'm not sure why the "STM32 Introduction and Preparation" link didn't
work when outlined, but it works inline so that's fine.
I'm trying to consistently stick with nonsecure, not the hyphenated
version, because that's what I mostly see in the Arm docs (although they
are not consistent at all).
Secure Mode and Nonsecure Mode are specific terms of art, and get written
in title case.

But nonsecure SRAM, secure SCB - they get lower case.

I also tried to use Nonsecure Mode binary rather than nonsecure app
(although the example binary is still called 'nonsecure-app')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants