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

stm32 flash read out protection rdp in a common file #81876

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

FRASTM
Copy link
Collaborator

@FRASTM FRASTM commented Nov 25, 2024

Following the PR "Implement readout protection for STM32H7" #76640, it appears that
" Function flash_stm32_option_bytes_lock() seems to be the obvious candidate to be moved to" a common file to stm32h7 anr other stm32 series.
This common file could be the existing drivers/flash/flash_stm32_ex_op.c
The flash_stm32_option_bytes_lock() is moved there and the flash_stm32_write_protection is made external to that file

Place the flash_stm32_sem_take and flash_stm32_sem_give
function to header file for common to use in any flash driver

Signed-off-by: Francois Ramu <[email protected]>
Move the stm32 flash driver ex_op functions to common
flash_stm32_ex_op.c file.

Signed-off-by: Francois Ramu <[email protected]>
Implement the readout protection for the STM32H7 series.
Define the specific functions used by the flash_stm32h7.
Remove reference to the stm32H7 from the flash_stm32.c

Signed-off-by: Francois Ramu <[email protected]>
Move the stm32h7 flash register manipulation in a write_optb()
to be called by the flash_stm32_set_rdp_level

Signed-off-by: Francois Ramu <[email protected]>
Add the configuration to run the testcase
with READOUT_PROTECTION (RDP) on stm32h7 disco kits

Signed-off-by: Francois Ramu <[email protected]>
@FRASTM FRASTM added platform: STM32 ST Micro STM32 area: Flash DNM This PR should not be merged (Do Not Merge) labels Nov 25, 2024
Move the flash_stm32_write_protection and
flash_stm32_option_bytes_lock functions to a common
file for stm32 devices including stm32h7

Signed-off-by: Francois Ramu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash DNM This PR should not be merged (Do Not Merge) platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant