Skip to content

Fix Overdrive and BDMADR fields on h743/h753 #649

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 2 commits into from
Jan 14, 2022

Conversation

sephamorr
Copy link
Contributor

@sephamorr sephamorr commented Oct 20, 2021

Adding fixes to two fields on h743/h753 micros. These bugs were found by comparing against h747 svd files and verified to not be present on any other h7 micros (beyond those fixed in this PR).

ODEN should be 1-bit and have an enumeration. H747 had the correct bit width already; the oden patch is now applied to more devices.
BDMADR should be at 0x70, not 0x60.

@github-actions
Copy link

Memory map comparison

@adamgreig
Copy link
Member

Thanks for this PR! Your changes look good, but we try to keep structural changes like the offset and field width to files in devices/ (and especially devices/common_patches/ for files that affect multiple devices), keeping peripherals/ just for enumerations.

Would you mind moving the two patches into suitable files in devices/? Thanks!

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

Memory map comparison

@sephamorr
Copy link
Contributor Author

@adamgreig Are these acceptable locations? It seemed that there were some in peripheral subfolders but the bulk just in the root devices/common-patches folder.

There may be more consequences to the name change made I made in this commit for H7{4,5}3v - this fixes the generation of the web pages (makehtml.py) which otherwise could randomly pick h743 or h743v for the h743 entry since the name in the SVD file was identical where is should instead have a line item for all four H7{4,5}3{none, v}

@richardeoin
Copy link
Member

SYSCFG:
  PWRCR:
    ODEN:
      Disabled: [0, "Overdrive mode disabled"]
      Enabled: [1, "Overdrive mode enabled (the LDO generates VOS0 for VCORE)"]

This is a human-readable enumeration, so it lives in peripherals/


SYSCFG:
  PWRCR:
    _modify:
      ODEN:
        bitWidth: 1
        description: "Overdrive enable"

This changes the register layout, so lives in devices/


You should be able to leave the existing syscfg_h747.yaml alone, and just add common_patches/h74x_syscfg_pwrcr.yaml as a new file.

For the BDMADR patch, devices/common_patches/h743_hrtim_common.yaml is good already!

Co-authored-by: Alexander Dewing <alexanderdewing@gmail.com>
@github-actions
Copy link

Memory map comparison

@andrewgazelka
Copy link
Contributor

SYSCFG:
  PWRCR:
    ODEN:
      Disabled: [0, "Overdrive mode disabled"]
      Enabled: [1, "Overdrive mode enabled (the LDO generates VOS0 for VCORE)"]

This is a human-readable enumeration, so it lives in peripherals/

SYSCFG:
  PWRCR:
    _modify:
      ODEN:
        bitWidth: 1
        description: "Overdrive enable"

This changes the register layout, so lives in devices/

You should be able to leave the existing syscfg_h747.yaml alone, and just add common_patches/h74x_syscfg_pwrcr.yaml as a new file.

For the BDMADR patch, devices/common_patches/h743_hrtim_common.yaml is good already!

Should be fixed. :) Let me know if there is anything else you would like changed.

@richardeoin
Copy link
Member

Looks good, thanks! Do you know the reason for adding the modify name: STM32H753v on the stm32h753v SVD? Since that 'v' isn't officially in the part number (it was a bit of a hack to track the chip revision..), I'd say we should just leave the current name of STM32H753

@sephamorr
Copy link
Contributor Author

sephamorr commented Dec 15, 2021

Looks good, thanks! Do you know the reason for adding the modify name: STM32H753v on the stm32h753v SVD? Since that 'v' isn't officially in the part number (it was a bit of a hack to track the chip revision..), I'd say we should just leave the current name of STM32H753

The reason for adding the -V suffix fixes a separate problem where the website (https://stm32-rs.github.io/stm32-rs/) doesn't disambiguate the H743 and H743v so only presents the H743 svd and documentation status. I'm open to any solution to this problem, but this seemed the simplest to me due to the way the scripts currently work.

@andrewgazelka
Copy link
Contributor

@richardeoin

@richardeoin
Copy link
Member

Understood about changing the name to fix the website, but I would prefer to do that in a separate PR. If you can keep the name the same for this PR I can get it merged

@andrewgazelka
Copy link
Contributor

Understood about changing the name to fix the website, but I would prefer to do that in a separate PR. If you can keep the name the same for this PR I can get it merged

Fixed

@github-actions
Copy link

Memory map comparison

@richardeoin
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 14, 2022

👎 Rejected by too few approved reviews

Copy link
Member

@richardeoin richardeoin left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 8b46cf7 into stm32-rs:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants