Skip to content

Conversation

@FRASTM
Copy link
Contributor

@FRASTM FRASTM commented Feb 8, 2023

Some old stm32 nucleo boards, like the MB1136 have no HSE : 8MHz crystal is not mounted and SolderBridge is not ON to get HSE from STlink with Bypass.

nucleo-64 boards MB1136 from rev C 02 have the 8MHz from the stlink (no X3 oscillator) mounted --> hse-bypass;
nucleo-64 boards MB1136 of rev C 01 have NO 8MHz X3 oscillator mounted and NO bypass from STlink : HSE cannot be used
This is a board revision C01 is created : with fixed clock source HSI but no HSE
Build for that board with
$ west build -b nucleo_f401re@C01 samples/hello_world/
To accept that format of board revision, modifying the cmake/modules/extensions.cmake is required to add a ALPHANUMerical format like "C01"

Not giving a BOARD_REV_HIGHEST_REVISION for this model.

Fixes #50440

Signed-off-by: Francois Ramu [email protected]

@FRASTM FRASTM changed the title add board revision in the config to address nucleo without HSE stm32 board revision in the config to address nucleo without HSE Feb 8, 2023
@FRASTM FRASTM requested review from erwango and gautierg-st February 8, 2023 10:48
@FRASTM FRASTM added this to the future milestone Feb 8, 2023
@FRASTM FRASTM force-pushed the board_rev branch 3 times, most recently from a5c8f6a to 7ec321b Compare February 8, 2023 12:20
@FRASTM FRASTM marked this pull request as ready for review February 22, 2023 13:27
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.

One comment, otherwise LGTM.
But I'd like @tejlmand to ack on the revision scheme addition (which looks good to me)

Add the combination of Letter and Number(s) for the Revision
format of the Hardware Board.
This is for example used for nucleo_stm32f401re rev C01

Signed-off-by: Francois Ramu <[email protected]>
Define a HW revision of nucleo_f401re  (MB1136)
rev C-01 corresponds to a board, configured as HSE not used
then forcing the HSI for the DTS of that board.
rev C-02 (or higher) corresponds to a board, configured to use
ST-LINK MCO as the clock input (HSE bypass).
To build with "west build -b nucleo_f401re@C01 samples/hello_world"
The default HW revision is C-02  (for any board rev. C-02 and above)

Signed-off-by: Francois Ramu <[email protected]>
@FRASTM
Copy link
Contributor Author

FRASTM commented Feb 23, 2023

rebase and complete the nucleo_f401re@C01 to redefine the pll from hsi source

Copy link
Contributor

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Haven't tested this since I manually made the change on my board to HSE but looks OK

@FRASTM FRASTM requested a review from erwango February 27, 2023 13:39
@erwango
Copy link
Member

erwango commented Feb 27, 2023

@tejlmand Can you review the revision scheme addition part ?

Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

currently not convinced we should introduce the ALPHANUM scheme.
There is simply to many variations possible when starting to combine letters and numbers.
One letter + n-digits.
n-letters + n-digits
digits first + letters.
letters and digits mixed within each other.

We still provide an option for boards to use any revision format they like, ref: https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#custom-revision-cmake-files
exactly for use-cases like the C01 revision, but as general supported types we try to just handle some very basic formats.

If you would like to propose extending the types supported to include an ALPHANUM, then I ask you to open a dedicated PR for that and include a wider audience in the review.

Comment on lines +920 to +921
if(BOARD_REV_FORMAT STREQUAL ALPHANUM)
set(revision_regex "([A-Z][0-9]+)")
Copy link
Contributor

Choose a reason for hiding this comment

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

this ALPHANUM revision format seems to specific for the nucleo boards.

So far i'm not convinced we should extend the common helper for this case.

What about a two letters + numbers, or the opposite, number, like 25hdd ?
Should that be called NUMALPHA.

Note, boards can use any revision format they like, but not everything need to have built-in support in the board_check_revision() function.

For example, the legend board uses revisions 25hdd, 25ssd, 35.
Ref:
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/arm/legend/revision.cmake

Also read:
https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#custom-revision-cmake-files

@github-actions
Copy link

github-actions bot commented May 3, 2023

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 3, 2023
@github-actions github-actions bot closed this May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Older stm32 (nucleo) boards without 8MHz ST-LINK clock do not work

5 participants