Skip to content

Conversation

@zfields
Copy link
Contributor

@zfields zfields commented Dec 8, 2025

No description provided.

@zfields zfields force-pushed the zak-heron branch 5 times, most recently from ac21877 to 016df1b Compare December 9, 2025 18:02
@fpistm fpistm self-requested a review December 9, 2025 18:46
@fpistm fpistm added this to the 2.12.0 milestone Dec 9, 2025
@fpistm fpistm added the new variant Add support of new bard label Dec 9, 2025
@zfields zfields force-pushed the zak-heron branch 10 times, most recently from 832bf50 to c25c5b3 Compare December 11, 2025 11:37
@zfields zfields marked this pull request as ready for review December 11, 2025 11:37
@zfields
Copy link
Contributor Author

zfields commented Dec 11, 2025

@fpistm Does the ST Low Power Library work with the U5?

All my tests are passing, except I cannot achieve Low Power using the same sketch I use on both the Cygnet and Swan.

Do you see anything wrong with my board configuration that would prevent me from achieving low power?

@fpistm
Copy link
Member

fpistm commented Dec 11, 2025

@fpistm Does the ST Low Power Library work with the U5?

All my tests are passing, except I cannot achieve Low Power using the same sketch I use on both the Cygnet and Swan.

Do you see anything wrong with my board configuration that would prevent me from achieving low power?

As far as I remember, yes it works. Anyway it is possible that a bug or a missing configuration exist. Like for the USB part.
Hard to review your configuration as I do not have any information on the board. My review will mainly consist to ensure it has the good format and check some specific configurations.

Comment on lines +16842 to +16848
Blues.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
Blues.menu.dbg.enable_all.build.flags.debug=-g
Blues.menu.dbg.enable_sym=Symbols Enabled (-g)
Blues.menu.dbg.enable_sym.build.flags.debug=-g -DNDEBUG
Blues.menu.dbg.enable_log=Core logs Enabled
Blues.menu.dbg.enable_log.build.flags.debug=
Blues.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
Blues.menu.dbg.enable_all.build.flags.debug=-g
Blues.menu.dbg.none=None
Copy link
Member

Choose a reason for hiding this comment

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

I don't recommend to change this order.
If you need to debug, the correct way is to enable the "Optimize for debugging" in the Arduino IDE menu. Then debug and symbol is activated.
Else this mean by default binary is more fat.

| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32L4R5ZIYx | [Swan R5](https://blues.com/products/swan) | *2.1.0* | |
| :green_heart: | STM32L433CC | [Cygnet](https://blues.com/products) | *2.8.0* | |
| :yellow_heart: | STM32U575CITx | [Heron](https://blues.com/products) | *2.12.0* | |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| :yellow_heart: | STM32U575CITx | [Heron](https://blues.com/products) | *2.12.0* | |
| :yellow_heart: | STM32U575CITx | [Heron](https://blues.com/products) | **2.12.0** | |

Comment on lines +16385 to +16391
Blues.menu.opt.ogstd=Debug (-Og)
Blues.menu.opt.ogstd.build.flags.optimize=-Og
Blues.menu.opt.osstd=Smallest (-Os default)
Blues.menu.opt.oslto=Smallest (-Os) with LTO
Blues.menu.opt.oslto.build.flags.optimize=-Os -flto
Blues.menu.opt.o0std=No Optimization (-O0)
Blues.menu.opt.o0std.build.flags.optimize=-O0
Copy link
Member

Choose a reason for hiding this comment

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

I advise to not change order.
If you need to debug, the correct way is to enable the "Optimize for debugging" in the Arduino IDE menu. Then debug and symbol is activated.

Comment on lines +26 to +61
#define PA0 PIN_A0 // A0/D0
#define PA1 PIN_A1 // A1/D1
#define PA2 PIN_A2 // A2/D2
#define PA3 PIN_A3 // A3/D3
#define PA4 PIN_A8 // A8/BATTERY_VOLTAGE (STAT)
#define PA5 25 // USART3_VCP_RX
#define PA6 PIN_A6 // A6/MI
#define PA7 PIN_A5 // A5
#define PA8 7 // LED_BUILTIN
#define PA9 19 // TX
#define PA10 18 // RX
#define PA11 32 // USB_D_N
#define PA12 33 // USB_D_P
#define PA13 23 // SWDIO
#define PA14 24 // SWCLK
#define PA15 29 // CHARGE_DETECT
#define PB0 PIN_A7 // A7/D11
#define PB1 PIN_A4 // A4/D4
#define PB2 31 // USB_DETECT
#define PB3 15 // CK
#define PB4 13 // D13
#define PB5 16 // MO
#define PB6 21 // SCL
#define PB7 22 // SDA
#define PB8 5 // D5
#define PB9 6 // D6
#define PB10 26 // USART3_VCP_TX
#define PB13 10 // D10
#define PB14 9 // D9
#define PB15 12 // D12
#define PC13 8 // USER_BTN
#define PC14 34 // OSC32_IN (LSE)
#define PC15 35 // OSC32_OUT (LSE)
#define PH0 27 // ENABLE_3V3
#define PH1 28 // DISCHARGE_3V3
#define PH3 20 // B
Copy link
Member

Choose a reason for hiding this comment

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

Hard to check if all pin have an unique number as not ordered. Anyway I guess you have tested.
You can use this example to check if definition is correct:
https://github.com/stm32duino/STM32Examples/tree/main/examples/NonReg/CheckVariant

RCC_OscInitStruct.MSIState = RCC_MSI_ON;
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_0; // 100 kHz initially (will be overridden later)
RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT;
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; // Critical for USB
Copy link
Member

Choose a reason for hiding this comment

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

Only of you left the CLK48 clk mux by default (HSI48).
As in your case you do not used PLL the only way is effectively HSI48 or maybe set MSK at 48000.

@github-project-automation github-project-automation bot moved this from In progress to Needs review in STM32 core based on ST HAL Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new variant Add support of new bard

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

2 participants