Skip to content

STM32: Add STM32C092 SoC support and NUCLEO-C092RC #93263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 25, 2025

Conversation

str4t0m
Copy link
Contributor

@str4t0m str4t0m commented Jul 17, 2025

Add STM32C091/STM32C092 as a member of the STM32C0 family with additional timer, serial interfaces and CAN-FD(C092 only) support.

  • soc: st: stm32: add stm32c091/c092 support
  • dt-bindings: clock: stm32c0: add can-fd domain clock helper
  • dts: arm: st: stm32c0: add stm32c091/c092 support
  • dts: arm: st: stm32c0: add counter nodes to all timers
  • Add overlays for the ADC API, UART async API, the counter basic API tests, as well as the st wkup-pin sample.
  • boards: st: add nucleo_c092rc

@str4t0m str4t0m marked this pull request as ready for review July 18, 2025 22:35
@zephyrbot zephyrbot added platform: STM32 ST Micro STM32 area: UART Universal Asynchronous Receiver-Transmitter area: Counter area: ADC Analog-to-Digital Converter (ADC) area: Clock Control labels Jul 18, 2025
@str4t0m str4t0m assigned erwango and unassigned nordic-krch Jul 19, 2025

.. zephyr:board-supported-runners::

Nucleo C092RE board includes an ST-LINK/V2-1 embedded debug tool interface.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Nucleo C092RE board includes an ST-LINK/V2-1 embedded debug tool interface.
Nucleo C092RC board includes an ST-LINK/V2-1 embedded debug tool interface.

Please check for similar typos you might have elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for spotting the typo. Should be fixed now.

@str4t0m str4t0m force-pushed the stm32c092 branch 2 times, most recently from c9b6c2f to e412578 Compare July 19, 2025 11:39
@str4t0m str4t0m requested a review from kartben July 19, 2025 12:17
Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

There is a typo in message for commit tests: drivers: uart: uart_async_api: add nucleo_c092rc overlay (STM32CO instead of STM32C0).

The following commits should come after the board is introduced:

  • tests: drivers: adc: adc_api: add overlay for nucleo_c092rc
  • tests: drivers: uart: uart_async_api: add nucleo_c092rc overlay
  • tests: drivers: counter: counter_basic_api: add nucleo_c092rc overlay

+ some remarks but otherwise LGTM on surface

str4t0m added 2 commits July 22, 2025 06:15
Adds SoC support for the STM32C091, and the STM32C092 SoCs
which are part of the STM32C0 series.

Signed-off-by: Thomas Stranger <[email protected]>
On STM32C092 variants CAN-FD is supported, and the clock
source can be chosen in the CCIPR1 register.
This commit adds the helper to prepare that choice for the register.

Signed-off-by: Thomas Stranger <[email protected]>
Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

Minor cosmetic remarks but LGTM otherwise.

Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

A few other cosmetic things I missed in previous review

mathieuchopstm
mathieuchopstm previously approved these changes Jul 23, 2025
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Minor comment otherwise LGTM

Comment on lines +10 to +15
/delete-node/ &usb;
/delete-node/ &usb_fs_phy;
Copy link
Member

Choose a reason for hiding this comment

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

I generally want to avoid use of /delete-node/ in such files.
For this specific set-up I don't have a simple way to avoid it today.
Though, we'll be able to remove it the day stm32c051 is introduced as stm32c051 is a stm32c071 w/o usb.

Please update your note to feature this so it is obvious for next one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added a comment to the stm32c091.dtsi file.
If you prefer to factor out the peripherals from the stm32c071.dtsi file, i.e. introduce the c051 line let me know.
I can't test it on stm32c051 specifically, but I don't think there would be much risk, given the errata of c051 doesn't list anything the c071 doesn't

Copy link
Member

Choose a reason for hiding this comment

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

This is a nice offer @str4t0m. That would be indeed cool if you have some free cycles to do so. Additional benefit is that we'll then have the complete support of the series ✔️

str4t0m added 7 commits July 23, 2025 16:46
Add dts support for the STM32C091 and STM32C092 SoCs,
that are part of the STM32C0 series.

Signed-off-by: Thomas Stranger <[email protected]>
Add the counter nodes (compat st,stm32-counter)
to all timers of the STM32C0 series.

Signed-off-by: Thomas Stranger <[email protected]>
Adds definitions for the nucleo_c092rc supporting
the STM32C092RC entry-level MCU with CAN-FD support.

The series does not have a pll, so with the given 48MHz
CAN core clock frequency the internal timing calculation
can't find parameters for 5MHz data bitrate,
and for 8MHz they have an error of 84/1000.

Signed-off-by: Thomas Stranger <[email protected]>
Add an overlay to use adc1 channel 0 (on PA0) for testing.

Signed-off-by: Thomas Stranger <[email protected]>
Add a overlay for the nucleo_c092 testing usart4 and dma
channels 6 and 7. These are all not available in smaller STM32C0 SoCs.

Signed-off-by: Thomas Stranger <[email protected]>
Add a overlay to the counter_basic_api test to enable the counter node
of TIM2, TIM3, and TIM14 to TIM17.

Signed-off-by: Thomas Stranger <[email protected]>
Add an overlay to the st specific power_mgmt wkup_pins sample
for the nucleo_c092rc board.
The user_button on pc13 is used as the wakeup-src.

Signed-off-by: Thomas Stranger <[email protected]>
Copy link

@str4t0m str4t0m requested a review from mathieuchopstm July 24, 2025 16:11
@cfriedt cfriedt merged commit 5673189 into zephyrproject-rtos:main Jul 25, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: CAN area: Clock Control area: Counter area: Samples Samples area: UART Universal Asynchronous Receiver-Transmitter platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants