2023-10-03 01:18 AM
WRP cho phép cấu hình các vùng bộ nhớ Flash không thể ghi vào sau khi chúng đã bị khóa. Lõi xử lý chính (Cortex-M4) chỉ có quyền truy cập và thực thi mã nguồn trong các vùng bộ nhớ được bảo vệ bởi WRP??? Điều này đúng hay sai?
Solved! Go to Solution.
2023-10-04 08:07 AM
Well, all these functions are explained in detail in RM0440, section 3.5.
2023-10-04 01:30 AM
Welcome @Locnvselex_vn, to the community!
I've translated your question with a web-based translation tool to increase the chances that you will get an answer from our experts and community members, as the majority communicate in English:
WRP allows configuration of Flash memory regions that cannot be written to after they have been locked. The main processing core (Cortex-M4) only has access to and executes source code in memory regions protected by WRP??? This is true or false?
I don't know if "has access to and executes source code" is translated correctly, because the CPU does not execute source code, but the translated binary code. If this is what you meant, your statement is absolutely correct and is also stated in RM0440, section 3.5.3:
When WRP is active, it cannot be erased or programmed. Consequently, a software mass erase cannot be performed if one area is write-protected.
Does it answer your question?
Regards
/Peter
2023-10-04 03:35 AM
Thank you for your feedback! I am currently researching the functions of Readout protection (RDP), Proprietary Code Read Out Protection (PCROP), and Write Protection (WRP) to implement them on STM32G4xx chips for our products. However, the manufacturer's documentation does not clearly explain these functions. Could you please provide detailed information about them, including their specific features? Thank you
2023-10-04 08:07 AM
Well, all these functions are explained in detail in RM0440, section 3.5.
2023-10-05 11:25 PM
Thank you for your feedback! The area protected by PCROP will not be allowed to be written or read, but only used for storing code executed by the CPU. So, it is protected from reading by what behaviors? Can external accesses, MCU instructions be executed? Can hackers using source code such as HAL, LL access and read data in the protected memory area?
Is it true that the MCU only has the right to execute code in the protected area and cannot read data in the protected area? If so, if code outside the protected area needs to retrieve data in the protected area to execute, will it cause an error? Please clarify these issues for me.
I did not find any information related to these issues in your documentation
2023-10-06 02:14 AM
I hope that the supplementary information on PCROP in the STM32G4 that you find in AN4758 answers your questions?
Regards
/Peter
2023-10-06 07:35 PM
WRP protects FLASH memory sectors/pages against write/erase regardless of what tries to do it. RDP protects almost all memories from readout by debugger, but does not stop the CPU and other internal peripherals from doing anything with those memories. PCROP can also protect memories from read/write by debugger or internal peripherals.
And all of it is documented in the reference manual and application notes...