This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Protecting part of Flash Memory in MSP430F5438A in Bank B

Other Parts Discussed in Thread: MSP430F5438A

Hello,

i am using MSP430F5438A in my firmware upgrade project in which i have a piece of code located at some location in Bank B of the Flash memory. i want to protect this part of Flash memory (i.e. 2 KB to be specific ). so that for next firmware upgrade this portion is there in the flash even if the whole flash is erased.


Suggest something to protect this portion of code on Flash memory.

Thanks

  • Unfortunately, you can not protect it hardware-wise. In order to preserve it in between firmware upgrades, you'll need to 1) provide correct BSL password, otherwise the bulk erase occurs wiping out the whole flash area; 2) during firmware upgrade erase only the segments that have to be erased, excluding the ones that have to be preserved.

    There are several threads on this forum describing detail of how to do this.

  •  

    Serge A said:

    Unfortunately, you can not protect it hardware-wise. In order to preserve it in between firmware upgrade, you'll need to provide correct BSL password, otherwise the bulk erase occurs wiping out the whole flash area.

    Thanks for the prompt reply, I m not using BSL in my project, neither do i wish to. to erase/upgrade/write into Flash memory i am using Flash Programming. Do you have any other approach to Protect Flash? is there any other option through which i can add/modify my code and protect that field?

    Thanks

  • You can not do it on MSP device itself. But your Flash programming tool may have set-up options which allows to exclude some segments or banks from programming.

    If you program your flash from the program running on the device, you can provide some level of protection, but it is still software one, and as such, is not 100% reliable. For example, you can copy your 2K to some other storage (if there are any) as a back-up before you start firmware upgrade.

  • Hey Serge,

    i am using CCS as my programming tool and the code is written in C. can you explain me about the options to exclude/include some segments for writing/deleting in Flash memory or suggest some documents. I have gone through Flash Programming and Data Sheets for the MSP430F5438A.

    Thanks.

  • Are you using MSP-FET430UIF for programming? If so, have a look on Elpotronic site http://www.elprotronic.com/download.html). They produce some tools for programming, some are for free (FET-Pro430 Lite Software), which are much more capable of reading/writing/erasing flash. Not sure, but they may have an option to preserve some segments in a bank from being erased/overwritten.

**Attention** This is a public forum