-
Notifications
You must be signed in to change notification settings - Fork 243
H7 hi mem flash #1224
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
base: master
Are you sure you want to change the base?
H7 hi mem flash #1224
Conversation
devices/patches/rtc/h7_hi_mem.yaml
Outdated
_modify: | ||
ICSR: | ||
name: ISR |
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.
@burrbull
What am I doing wrong here?
Without this fix:
$ cargo c --features stm32h7b3,rt,defmt
[...]
error[E0599]: no method named `isr` found for struct `Periph<stm32h7::stm32h7b3::rtc::RegisterB
lock, 1476411392>` in the current scope
--> src/rtc.rs:765:26
|
765 | self.reg.isr().modify(|_, w| w.wutf().clear_bit());
| ^^^
|
help: there is a method `icsr` with a similar name
|
765 - self.reg.isr().modify(|_, w| w.wutf().clear_bit());
765 + self.reg.icsr().modify(|_, w| w.wutf().clear_bit());
[...]
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.
For reference I can see ICSR here
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.
Or perhaps this should not even be done in the first place. There does seem to be quite a bit of differences between the RTC in RM0455 as compared to RM0433. In RM0433 we have the battery backed ram in RTC_BKP[0-31]R but I can not seem to find that in RM0455 even though it is mentioned as a feature from what I can tell.
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.
You should not do this on PAC level. H7A/B have newer RTC.
ISR and ICSR work different.
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.
Ok, thank you. Makes sense.
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.
Do you know how one is supposed to access the battery backed sram from the rm0455 devices? Is that supposed to be accessable throught the pac as with the other devices or is the hal supposed to use some other method like raw pointers or arrays in linker sections?
CR[12]: | ||
_modify: | ||
SSN[12]: | ||
name: SNB |
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.
How about this? Do you think this should be done? From what I can tell, the SSN in RM0455 4.9.4 seems to do the same thing as SNB from rm0433 4.9.4, however at a different bit position and width
rm0455
Bits 12:6 SSN1: Bank 1 sector erase selection number
These bits are used to select the target sector for an erase operation (they are unused
otherwise). SSN1 can be programmed only when LOCK1 is cleared to 0.
0x00: Sector 0 of user flash bank 1 selected
0x01: Sector 1 of user flash bank 1 selected
..
rm0433
Bits 10:8 SNB1: Bank 1 sector erase selection number
These bits are used to select the target sector for a sector erase operation (they are unused
otherwise). SNB1 can be programmed only when LOCK1 is cleared to 0.
000: sector 0 of bank 1
001: sector 1 of bank 1
...
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.
Let me know if you want me to revert this too :)
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.
Not sure. I'm fine with both variants.
No description provided.