Skip to content
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

wb55: fix SYSCFG base address (and Makefile) #473

Closed
wants to merge 2 commits into from

Conversation

eupn
Copy link
Contributor

@eupn eupn commented Jan 7, 2021

This is a batch of two fixes:

  • Uses the correct base address from the RM for SYSCFG. This fix was checked to work in the hardware
  • Fixes Makefile to produce correct directory

@github-actions
Copy link

github-actions bot commented Jan 7, 2021

Memory map comparison

@adamgreig
Copy link
Member

Thanks!

It looks like the SYSCFG problems run deeper: the reason the SVD has the wrong address is because SYSCFG is split between 4001_0000-4001_002F and 4001_0100-4001_01FF with VREFBUF stuck in the middle. As well as updating the baseAddress as you've done, we should update the addressBlock size to 0x200. Unfortunately it seems all the registers in the 4001_0100 region are wrong in the SVD too (IMR1, IMR2, C2IMR1, C2IMR2, SIPCR) as their offsets ignore the jump over VREFBUF so need updating to 0x100, 0x104, etc.

@eupn
Copy link
Contributor Author

eupn commented Jan 16, 2021

@adamgreig so the next steps should be joining those two together with the VREFBUF area marked as reserved/skipped to get a contiguous memory map for SYSCFG?

@adamgreig
Copy link
Member

@adamgreig so the next steps should be joining those two together with the VREFBUF area marked as reserved/skipped to get a contiguous memory map for SYSCFG?

Yes, I think that's the best way to go.

@jorgeig-space
Copy link

The same problem exists in the WL family. I'll try to get to it this week and perhaps you can use the same patches here.

karlp added a commit to etactica/stm32-rs that referenced this pull request Sep 8, 2021
Fixes: stm32-rs#473

Fixes the base address, and then for the registers after the split,
fixup their addresses manually.

Signed-off-by: Karl Palsson <karlp@etactica.com>
karlp added a commit to etactica/stm32wb-hal that referenced this pull request Sep 8, 2021
This is likely to be more maintained going forward.
Only changes are due to upstream renaming fields in the SVD to be more
standard across families, and to more closely match the RefManuals.

Depends on either stm32-rs/stm32-rs#624
or stm32-rs/stm32-rs#473
and then a new upstream pac release, so _this_ commit should change to
depend on those, but this shows what's needed and how, for preview.

Signed-off-by: Karl Palsson <karlp@etactica.com>
@adamgreig
Copy link
Member

#493 cherry-picked the Makefile fix, and #624 fixes SYSCFG, so it looks like this PR can be closed now. Thanks for getting it started!

@adamgreig adamgreig closed this Sep 8, 2021
karlp added a commit to etactica/stm32-rs that referenced this pull request Sep 9, 2021
Fixes: stm32-rs#473

Fixes the base address, and then for the registers after the split,
fixup their addresses manually.

Signed-off-by: Karl Palsson <karlp@etactica.com>
bors bot added a commit that referenced this pull request Sep 9, 2021
624: stm32wb: syscfg: fix split sections r=adamgreig a=karlp

Fixes: #473

Fixes the base address, and then for the registers after the split,
fixup their addresses manually.

Signed-off-by: Karl Palsson <karlp@etactica.com>

Is there really any need to specifically mark the VREFBUF as "reserved" within the syscfg block as discussed in #473? is that important? the memory map generated looks correct.

Co-authored-by: Karl Palsson <karlp@etactica.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants