-
Notifications
You must be signed in to change notification settings - Fork 146
lib: stm32wba: use reference count for backup domain accesses #290
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
This change is related to zephyrproject-rtos/zephyr#92005. |
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.
HAL libraries are not supposed to call Zephyr code.
Alternative it to move these porting functions within zephyr repo, where they're supposed to be implemented. See https://github.com/zephyrproject-rtos/zephyr/soc/st/stm32/stm32wbax/hci_if/linklayer_plat_adapt.c
Ok, thanks, I'll update this P-R and created the related one in Zephyr. |
lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
Outdated
Show resolved
Hide resolved
c9c6dfe
to
9b73e1a
Compare
lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
Outdated
Show resolved
Hide resolved
9b73e1a
to
b78ac01
Compare
Updated. |
Add LINKLAYER_PLAT_EnableBackupDomainAccess() and LINKLAYER_PLAT_DisableBackupDomainAccess() to use Zephyr resources that use a reference counter for access requests, for enabling and disabling access the BackupDomain resources. Signed-off-by: Etienne Carriere <[email protected]>
b78ac01
to
688fb3c
Compare
Updated to lower impact on lib/stm32wba maintenance. |
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.
Ideally we'd move the entire LINKLAYER_PLAT_ClockInit
away, but that seems easier said than done...
So this is fine for me 🙂
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.
It looks perfect for me.
Also to highlight changes required for Zephyr use case.
@asm587, as mentionned by @mathieuchopstm ideally we should move whole function to zephyr repo. |
@erwango Indeed I totally agree with you |
Use Zephyr function
stm32_backup_domain_enable_access()
andstm32_backup_domain_disable_access()
to enable/disable access to LSE configuration registers under back domain access protection instead of raw access. These functions have a reference counter for access requests to ensure access remains enabled when other component require it.