stlink-org / stlink

Open source STM32 MCU programming toolset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] Read protect bits

AntonLytkinIwdel opened this issue · comments

Do you plan to make this functional?

no plan yet, but any contribution welcome !

2015-11-08 7:20 GMT+01:00 Anton Lytkin notifications@github.com:

Do you plan to make this functional?


Reply to this email directly or view it on GitHub
#346.

https://github.com/aric1987/stlink/
add read proctection
test ok! for stm32f103c8t6
@AntonLytkinIwdel

@aric1987 Why don't you create a PR for this?

@ceremcem: @aric1987 seem to be inactive by now.
I don't know yet, if his patch is still compatible with the current codebase. One needs to check.

@Ant-ON: As I believe to read from the code that these protect bits are also included in the option bytes, as the whole area is written at once. Is this correct?

commented

@Nightwalker-87 Yes, on F0/F1/F3:

  /* Retrieve current values */
  ret = stlink_read_debug32(sl, FLASH_OBR, &optiondata);
  if (ret) {
    return ret;
  }
  ret = stlink_read_debug32(sl, FLASH_WRPR, &protection);
  if (ret) {
    return ret;
  }