0

erase Flash memory before Programing

nicewook gravatar image

asked 2017-09-13 14:27:05 +0100

Petter gravatar image

updated 2017-09-14 14:03:22 +0100

Question1.

when programming Application, there is no request for erase memory. why programming Bootloader requeset erase flash memory? how about Soft Device?

Question2.

I'm using nRF51. SDK11.

Can I program Application+BL+SD (merged to one hex with mergehex.exe) without remove pstorage page?

there is a memory area no t want to erase.

edit retag flag offensive close delete report spam

Comments

  1. Which program are you using to program? What do you mean by "no request for erase memory"? Are you talking about an eraseall? Erasing the complete flash? What are you trying to achieve?

  2. What do mean by without remove pstorage page? A flash page that have been used an old application with pstorage? Do you mean DFU or normal programming?

Petter Myhre ( 2017-09-14 14:07:06 +0100 )editconvert to answer

sorry for late reply

  1. in this post, I use nRFgo Studio.
  2. If I program Application, then not require erasing.
  3. I think this program erase memory before programming. (sector erase, I assume)
Jeong Hyun Seok ( 2017-09-26 15:44:31 +0100 )editconvert to answer

1 answer

Sort by ยป oldest newest most voted
1
Petter gravatar image

answered 2017-09-27 12:13:52 +0100

updated 2017-09-27 12:14:13 +0100

I recommend you to use nrfjprog directly, not nRFgo Studio.

Then you can give --sectorerase as an argument. For example:

nrfjprog -f nrf52 --program s132_nrf52_5.0.0_softdevice.hex --sectorerase
edit flag offensive delete publish link more

Comments

oh, this --sectorerase option can work for SoftDevice and Bootloader?

Jeong Hyun Seok ( 2017-09-27 14:53:15 +0100 )editconvert to answer

Did you try?

Petter Myhre ( 2017-09-27 16:02:06 +0100 )editconvert to answer

Yes, I tried, and it works! :-) so I programmed Bootloader, SoftDevice, and Application, one by one with --sectorerase option

It works! so I programmed new version of BL+APP+SD and still keep Pstorage memory info. Thank you. :-)

  • by the way, where can I find pstorage memory address to store things?
Jeong Hyun Seok ( 2017-10-10 02:57:48 +0100 )editconvert to answer

Cool :) Usually you can find the start and end addresses in pstorage_platform.h This might also be of help to you.

Petter Myhre ( 2017-10-10 10:43:53 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower

Stats

Asked: 2017-09-13 14:27:05 +0100

Seen: 48 times

Last updated: sep. 27