Other Parts Discussed in Thread: UNIFLASH, MSP-FET
Tool/software:
When I try to write data to the Information Memory of the MSP430F67791A using UniFlash's BSL (UART mode), I get a flash write error.
Note: when I write data to the Information Memory using the JTAG interface (not the BSL), there are no errors and the memory is written to successfully.
Tools/Equipment Used
- UniFlash version(s): 8.1.1.4146 and 9.2.0.5300 (older and the also the latest version show the same issue)
- MSP-FET debugger/programmer
- MSP430F67791A
Description
The MSP430F67791A has 512 bytes of Information Memory, located at address 0x1800.
This memory is split into 4 segments, each 128 bytes in size.
Note: each segment must be erased before it is written to.
I use a TI-TXT file that contains data to write to the Information memory (0x1800 - 0x19FF).
The write to the first segment (128 bytes) works ok, but writing to subsequent segments fails.
UniFlash Settings


UART Data
I "peeked" the BSL UART to see the message data and I decoded the transfer to/from the device using the MSP430 Flash Devices Bootloader (BSL) document, which shows the commands and responses as follows:
[FROM MSP430]
00 ACK
[TO MSP430]
80 Header
21 00 33 bytes
11 RX Password
E0 C0 DE C0 FF FF FF FF ... 32 byte password
33 68 Checksum
[FROM MSP430]
00 ACK
80 Header
02 00 2 bytes
3B BSL Core Response (message)
00 Operation Successful
60 C4 Checksum
[TO MSP430]
80 Header
01 00 1 byte
19 TX BSL Version
E8 62 Checksum
[FROM MSP430]
00 ACK
80 Header
05 00 5 bytes
3A BSL Core Response
00 07 05 04 BSL Version Number
AD 61 Checksum
[TO MSP430]
80 Header
04 00 4 bytes
12 Erase Segment
00 18 00 Address = 0x001800
D5 F8 Checksum
[FROM MSP430]
00 ACK
80 Header
02 00 2 bytes
3B BSL Core Response (message)
00 Operation Successful
60 C4 Checksum
[TO MSP430]
80 Header
84 00 132 bytes
10 RX Data Block
00 18 00 Address = 0x001800
54 9B 05 01 18 18 00 00 ... 128 bytes of data
88 C7 Checksum
[FROM MSP430]
00 ACK
80 Header
02 00 2 bytes
3B BSL Core Response (message)
00 Operation Successful (128 bytes programmed at 0x1800)
60 C4 Checksum
[TO MSP430]
80 Header
04 01 260 bytes
10 RX Data Block
00 19 00 Address = 0x001900
55 9B 04 01 14 19 00 00 ... 128 bytes of data
55 9B 04 01 A4 19 00 00 ... 128 bytes of data
D6 CE Checksum
[FROM MSP430]
00 ACK
80 Header
02 00 2 bytes
3B BSL Core Response (message)
01 Flash Write Check Failed (CRC error).
41 D4 Checksum
Memory Read to Verify
I used UniFlash to read-back the data at location 0x1800 - 0x19FF and could see that the 1st 128-byte segment was written correctly, but subsequent segments were not.
I also used a test pattern to initialize the 512-byte Information Memory so I could more clearly see which bytes were not written to by the Bootloader.
The results showed that the 3 subsequent 128-byte segments were not erased before the write was attempted e.g., bits already set to zero using the test pattern were not affected, whereas bits set to 1 could be affected by the write access (this is expected, noting that the erased state of the flash is '1').
Conclusion
I believe that UniFlash is only sending one "erase segment" command (for the address at 0x1800) and therefore, will only erase the first 128 bytes at address 0x1800.
Therefore, when it tries to write/program data at subsequent segments e.g., at 0x1880, 0x1900 and 0x1980, without erasing those segment(s), it will fail to write the data to those next segments.
I think that this is why it fails to program the data at 0x1900.
I believe there needs to be an "erase" command for each 128-byte segment in Information Memory that UniFlash writes to, and that does not seem to be happening.
Hopefully my post all makes sense.
Thanks

