Other Parts Discussed in Thread: MSP430F5438
Hello,
I have recently come across a strange problem with an application I am working on. I have a small app that acts as a bootloader, it has been running fine for 2-3 months booting and upgrading my main application. A couple of weeks ago I needed to add a small amount of code to the bootloader app. When I tried to load the new code on to my hardware I got a 'Data Verification Error' in Code Composer. I then backed out the change, recompiled and successfully loaded the old bootloader app back on.
I couldn't solve the problem after reading through lots of posts on this subject so I did a bit more digging. I checked that the flash memory 0xf600 to 0xffff was erasable by running FET-Pro and erasing all of the memory on the chip. I confimed that the chip was correctly erased then loaded my new bootloader app on with Code Composer. Again, I got the 'Data Verification Error' so I read the contents of the memory back from the chip in FET-Pro and checked the address that failed. I noticed that the value of the byte at the address was 0xFF. As I also build ti-txt files as part of the build process, I found the area of memory in the file and compared the byte. It should have been set to 0xFD, which is probably why I'm getting the verification error. I checked the same location on the bootloader app that did load and the required byte was 0x13.
It seems as if there is one bit in that byte of flash that can be erased, but cannot be written to a 0. I have seen this problem on two pieces of hardware now, but at different memory addresses. Is there anything I could have done in software that could have caused this? I have recently had issues with the devices randomly rebooting when running my main application, which prompted the change in the bootloader app. I'm not sure if this could be related.
My Hardware is:
MSP430F5438, the PCB is powered either by mains voltage or 5v. This is regulated down to 3.3v to power the MSP and an ethernet chip. Also on the PCB are a few temperature sensors, a serial to usb chip and a couple of relays.
I have mainly been using Code Composer 4.1.2, but I have upgraded to 4.2.1 this week and still get the data verification problem.
Any advice on what may have caused the problem, or how I can resolve the problem, would be gratefully received.
Many thanks in advance.
Barry