cpu/stm32: add initial STM32U3 and nucleo-u385rg-q support#22175
cpu/stm32: add initial STM32U3 and nucleo-u385rg-q support#22175itsadarshnair wants to merge 17 commits intoRIOT-OS:masterfrom
Conversation
crasbe
left a comment
There was a problem hiding this comment.
Thank you for creating the Pull Request with the STM32U3 support.
This is the first review round that is has mostly style related comments. I will do a second round once everything style-wise is in order.
There are merge conflicts that have to be resolved before this can be merged.
4072c14 to
ca4fb00
Compare
crasbe
left a comment
There was a problem hiding this comment.
Please run dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . nucleo-u385rg-q on your local computer. There are still a lot of compilation errors from missing definitions. Unfortunately that does not show in our CI because the newly added board is not in the quickbuild list.
| /* Deduct the needed flash wait states from the core clock frequency */ | ||
| #define FLASH_WAITSTATES FLASH_ACR_LATENCY_2 |
There was a problem hiding this comment.
The comment says something different than the code.
| /* Check if PLL is required | ||
| * - When PLLQ is used as 48MHz clock source | ||
| */ |
There was a problem hiding this comment.
This comment block does not have a code block that belongs to it?
| /* | ||
| * SPDX-FileCopyrightText: 2026 Technische Universität Hamburg | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup cpu_stm32 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief STM32U3 clock initialization | ||
| * | ||
| * @author Adarsh Nair Mullachery | ||
| */ |
There was a problem hiding this comment.
The file looks like it was inspired by cpu/stm32/stmclk/stmclk_l5.c, right?
You should retain the copyright of the original authors if you copy a file.
If you added/changed a significant amount of it, you can add your own authorship and copyright, but you can never remove someone else's as long as there is code from the original author(s). And even then we usually keep it out of respect.
| # SPDX-License-Identifier: LGPL-2.1-only | ||
|
|
||
|
|
||
| # CPU lines |
There was a problem hiding this comment.
| # SPDX-License-Identifier: LGPL-2.1-only | |
| # CPU lines | |
| # SPDX-License-Identifier: LGPL-2.1-only | |
| # CPU lines |
Unnecessary empty line.
Contribution description
This PR adds initial support for the STM32U3 family and the NUCLEO-U385RG-Q board.
It includes:
cpu/stm32boards/nucleo-u385rg-qAt the moment, this is an initial bring-up PR. The board boots and the LED blinking example was verified on hardware. Other peripherals and features may still be incomplete or untested.
At this stage, OpenOCD flashing support is not yet available. The board was programmed using STM32CubeProgrammer.
Testing procedure
The changes were tested with the
examples/basic/blinkyapplication on thenucleo-u385rg-qboard.Build:
bash
make -C examples/basic/blinky BOARD=nucleo-u385rg-q
Issues/PRs references
Progress for Tracking Issue #19264.
Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are: