-
Notifications
You must be signed in to change notification settings - Fork 8.2k
stm32 board revision in the config to address nucleo without HSE #54601
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
Conversation
a5c8f6a to
7ec321b
Compare
There was a problem hiding this 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]>
|
rebase and complete the nucleo_f401re@C01 to redefine the pll from hsi source |
There was a problem hiding this 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
|
@tejlmand Can you review the revision scheme addition part ? |
There was a problem hiding this 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.
| if(BOARD_REV_FORMAT STREQUAL ALPHANUM) | ||
| set(revision_regex "([A-Z][0-9]+)") |
There was a problem hiding this comment.
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
|
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. |
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]