cancel
Showing results for 
Search instead for 
Did you mean: 

Run issue after setting RDP to level 1 (POR and reset)

HBida
Associate III

Hi,

For production purpose we designed a control board for the test jig which does unitary and RF testing as well as the programming of onboard SoC and MCU, the STM32 target in this case is an STM32F411CEU6, the test jig control board is also based on an STM32F411CEU6.

So far the SWD programming works perfectly well, and it is significantly faster than the STlink, it successfully erase the used page, unlock RDP when needed, and lock RDP to level 1 after flash programming, the issue is, after programming flash and setting RDP to level 1, there is no way to run the firmware, which is a problem because some fonctional tests are depending on the target firmware.

Basically once the RDP is set to level 1 the target will not run unless a physical power on reset (: disconnecting and reconnecting VCC and GND) plus a reset with the reset line is issued.

I tried various things to avoid this issue, such as issuing multiple/longer reset with the reset line, and also writing :

dap_write_word(DEMCR, 0x00000000);
  dap_write_word(AIRCR, 0x05fa0004);

to try forcing a reset-run, but nothing is working.

I have seen mention in some documents that we could either issue a POR or a reset with the reset line after setting RDP to level 1, but apparently only POR + reset works.

Does anyone know a way to fix this issue, because needless to say i did not include a load switch on VCC line in the control board to phycially issue a POR on the target. I only have RST, DIO, CLK.

Thank you

2 REPLIES 2

The 'F4 RMs are not clear about it, but other STM32 families' RMs hint about this, e.g. from RM0091 ('F0):

Note: If the read protection is set while the debugger is still connected through SWD, apply a POR

(power-on reset) instead of a system reset.

Now, 'F4 RM says, that power-on reset can be invoked by either undervoltage (BOR/POR), or exit from Standby. So, you can try the latter, maybe using a wakeup pin. I'm of course not sure this will work but why not giving it a try.

JW

PS. Somewhat related thread

mahk.1
Associate

I have the same problem.

there is no way to run the firmware after setting RDP to level 1

RESET and POR did not solve the problem.