2025-07-20 11:58 PM
Hi,
I am trying lock a portion of Flash memory using WRP(Write Protection). when I am configuring the Option bytes for WRP. I am using STM32L443VC MCU and I have multiple questions:
1. Which area to select WRPAreaA or WRPAreaB for page 0 to page 11 because there is no division of area given?
2. I am trying to lock from page 0 to page 11 in the flash memory but I am seeing different values even after OBL launch:
example: WRPStartOffset = 0x80 (Expected: 0x00)
WRPEndoffset = 0x0B (Expected: 0x0B)
This is because in the reference manual I see FLASH_WRP1AR reset value is 0xFFXX FFXX and in the register value is 0xFF00 FFFF. If I use Register value got 0xFF0B FF80 instead of 0xFF0B FF00. if I assume 0xFF00 FF00 i am getting 0xFF0BFF00. Even I tried for different page offset still I am seeing Startoffset value different. Please check the attached snapshots for your reference.
3. I am using segger jlink to flash the code and Please let me know how to flash using jlink for option bytes.
Please find the attached documents for your reference.
2025-07-25 3:49 AM - edited 2025-07-25 3:50 AM
Dear @Rakesh936 ,
Thanks for the follow-up . regarding Jflash tool from Segger , I believe the key word in our manual is “software” mass erase, it is not possible if one page is Write protected . That means the embedded firmware executed from Flash or RAM by CPU can not erase it self or do a mass erase. However with Jflash or Programmer they take the control over JTAG/SWD to the flash and have the ability to have back the device to a virgin ( out of factory) with A mass erase . In that case, we need to go to further level of protection and disabling the Debug I/F once your end product is released to market .
Hope it helps you,
STOne-32
2025-07-25 5:48 AM