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.
Hello,
I am trying to get mass erase to work on our MSP430FR5994 based control. The BSL is working mostly fine (all except the mass erase). I can enter the BSL, read and write info to the MCU, and even do a firmware update. However, the MASS ERASE is not working at all...
First off, I am using the BSL via UART entry. I modified the BSL Scripter App to send a "FORCE_BSL" uart command to our application to force it to enter the BSL. We use this method for all the commands above - so this method is working.
Com is setup for 9600 Baud.
Some background:
So my question is, how to get this to work? What am I missing? Is there something how the chip is wired that can prevent mass erase (tying a GPIO high vs low)?
Thanks,
-mike
Hi Mike
What's the host do you use?
The MPU is enabled by the CCS default, have you disable it?
Have you try it in a blank device?
Hello Gary,
Thanks for the reply... Regarding your questions...
The odd behavior is that we can do firmware update without mass erase by setting the password and sending the firmware image.
I can easily try disabling the MPU before we jump to the BSL. And will also try disabling completely and jumping to the BSL... As for the blank device, as of now I cannot do that. our programming header does not connect the emulator (MSP-FET) to the UART pins... And this MCU will not jump to BSL on blank detection...
Thanks,
-mike
Gary is your expert here, but I have found that entering BSL from a running application can be problematical because things may have been changed since bootup in ways the BSL doesn't expect, and which wouldn't have happened if entered immediately after a reset. However, it is surprising that everything seems to work except the mass erase.
I think it might be useful to try using the Test/Reset invocation trigger to see if mass erase works with that. There's a version of Scripter for Windows that has the option to generate that pattern and allows you to use a generic USB adapter as the hardware interface (so long as it includes DTR and RTS). See the Releases in this repo:
https://github.com/drcrane/bslscripter-vs2017
But I have to raise the same question I raised in another thread. Why do you need to mass erase? This is an FR part, and you say you are able to update firmware successfully without the mass erase. Why do you need to erase anything?
Hello George,
Regarding entering BSL via the application, I agree... Everything works except the mass erase... The mass erase only causes a reboot... I can only assume that we have the correct settings when entering the BSL from the application since every thing practically works...
The code to jump to boot is very simple and similar to the example in the guide...
Not sure what else we would need to get mass erase to work if all else is working... When we read data out, and then jump to the reset vector back into our application, that also works fine...
To answer your question about why the need for Mass Erase, our goal is to avoid having to deal with password maintenance for doing a firmware update for the many debug builds we hand out to the HW team... During our development cycle, we have many iterations of builds (and some generic HW test builds). We don;t want to have to maintain a list of all the passwords, and then correlate them to all the different debug builds... And as of now, we only have a handful of MSP-FETs (we could use uniflash). Our goal in the end is to have a single tool using BSL to read/write data we need if programming, or to mass erase if we don't remember the build that is on the MCU...
Regarding the Test/Reset invocation... We have plans to add that functionality to our programming board and to our PC tool that communicates via BSL. However, that will not be available till probably late this week to early next week for the HW. SW depends on the next priority (firmware updates vs application commands, ect)
Thanks,
-mike
I understand. Well it will be interesting to see what the solution is. In the worst case, you could use a jump table for the vectors so every version would have the same password. But mass erase should just work.
Hello All,
With the advice, we now know that having the MPU enabled will prevent MASS ERASE... So for my fix, in my jump to BSL routine, I just disable the MPU before jumping to the BSL. My guess is that if we use test/reset lines to enter BSL, we would not see this issue since the MPU is not enabled when entering the BSL from BOR. If we decide to lock the MPU, we will just have to mandate that the hardware invocation to BSL is used if we want to update firmware (mass erase) in instances where we do not know the password...
I did verify that I even with the MPU enabled, we can still enter the BSL password, and directly write the FRAM at any location... So MPU enable seems to only block the MASS ERASE...
Thanks a bunch,
-mike
**Attention** This is a public forum