Skip to main content
swapnil champaneria
Associate III
June 23, 2018
Solved

How to write a code after RDP level 1 ?

  • June 23, 2018
  • 1 reply
  • 1632 views
Posted on June 23, 2018 at 08:49

Hello

I am using stm32l152rc controller and I am trying to load a code using a dfusedemo application and during that time my flash  is on RDP level 1.

With help of msp my code jump to location 0x1FF00000 which is location of system boot loader.

So, My question is  how can I load a new code?

here I am attached some screen short which can help to identify my problem.

thanks,

Swapnil Champaneria

#system-bootloader #st-dfuse #rdp-level-1
This topic has been closed for replies.
Best answer by Tesla DeLorean
Posted on July 05, 2018 at 15:13

You don't want to use the BOOTx pins, or your design doesn't permit you too?

The RDP level effects the behaviour of the boot loader by locking it down. If you want different behaviour you are going to need to implement your own loader/DFU functionality, and perhaps erase/write individual sectors rather than bulk-erase.

Also as noted earlier you are setting the MSP incorrectly.

1 reply

Tesla DeLorean
Guru
June 24, 2018
Posted on June 24, 2018 at 19:56

You don't want to set the stack pointer to an address in ROM, the stack needs to be in RAM, per the *content* of the vector.

You might have to provide your own access methods for a part in RDP 1 as the system loader locks down certain functionality.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
swapnil champaneria
Associate III
July 5, 2018
Posted on July 05, 2018 at 13:31

sir,

Actually I'm using internal boot loader (system boot loader) with help of software because i don't want to use Boot 0 and Boot 1 pin to access that. Without RDP level 1 it's worked fine but when I apply RDP level 1 it won't work properly.

when I'm trying to decrees the RDP level 1 to 0 my flash was erased so I can't access boot loader (system boot loader) with help of software. 

thanks regards 

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 5, 2018
Posted on July 05, 2018 at 15:13

You don't want to use the BOOTx pins, or your design doesn't permit you too?

The RDP level effects the behaviour of the boot loader by locking it down. If you want different behaviour you are going to need to implement your own loader/DFU functionality, and perhaps erase/write individual sectors rather than bulk-erase.

Also as noted earlier you are setting the MSP incorrectly.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..