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.

MSP430 BSL programming error in writing data block

Other Parts Discussed in Thread: MSP430F1471

Dear All,

Now I am working on using a MCU to program the flash of device MSP430F1471 via the BSL UART interface.

But when I sent bytes to write, data read at the same address just wrote are all 0xff.

All procedures and commands sent before are normally with ACK 0x90 received.

Here is the flow.

1. Invoke to enter BSL mode.

2. Mass Erase (ACK received)

3. RX Password (ACK received)

4. RX data block @0x8000 with 128bytes (ACK received)

5. TX data block @0x8000 with 128bytes (total 4 + 128 + 2 bytes are received but data bytes are all 0xff)

And few more test were done.

- TX data block @0x0ff0 are correct as " F1 49 xx xx xx xx xx xx xx xx 01 10 ....", device code is F149 and BSL is v1.10.

- after programming the device via JTAG, the data read via BSL by TX data block @0x8000 are matched and correct.

Seems everything communication and protocol are correct but failed to write data block.

Please help advise.

Thanks.

  • Hi Jeff,

    What revision of the F14x are you using?

    The BSL version in the ROM of the F14x devices requires a patch sequence to be loaded first to be able to really RX data into the device. Please see the device errata document www.ti.com/lit/pdf/slaz137 errata BSL3 & 4, and see also the BSL User's Guide Table 5-1 and section 5.2 to see more notes regarding this:

    Comment 1: Workaround mandatory. Load PATCH.TXT to eliminate ROM bug (see Section 5.2 and  Section 2.5).

    Comment 2:  Optional for F148, F149 only: Use loadable BSL erase segment command (see Section 2.5).Load BL_150S_14x.txt to get all features of V1.60 plus valid erase segment command (see Section 2.5).

    Comment 3: Optional for F1x4 to F1x9: Use small loadable BSL (<512B RAM required). Load BS_150S_14x.txt to get some features of V1.60 (see Section 2.5). 

    You can get the patch.txt and BS_150S_14x.txt etc in the SLAU319 download that goes with the BSL user's guide: www.ti.com/lit/zip/slau319 You can find these files in the folder BSL Patch inside the download, and there is an example of using them if you look under Deprecated/BSLDEMO/EXE in the demo.bat file. Since you are using another MCU to do your BSL, it might also be useful to look at the source code included for BSLDEMO to see what it does when it loads the patch.

    I hope this helps get you up and running.

    Regards,

    Katie

    EDIT: Added some more links

  • Hi Katie,

    The device revision is S.

    It is great that your help have solved perfectly for my problem.

    I missed a very important information mentioned in the document slau319, the Comment 1"Workaround mandatory. Load PATCH.TXT......".

    Now my MCU flash programmer works fine and the flow is as following.

    1. Invoke to enter BSL mode.

    2. Mass Erase

    3. RX Password

    4. RX data block @0x0200 with data "PATCH.TXT"

    5. Load PC @0x0200.

    6. RX data block @0x8000 with 128bytes

    7. RX data block @0x0200 with data "PATCH.TXT" (do it every time before RX data block)

    8. Load PC @0x0200. (do it every time before RX data block)

    9. RX data block @0x8080 with 128bytes

    .....................

    n . RX data block @0xff80 with 128bytes

    n+1. TX data block @0x8000 with 128bytes

    n+2. TX data block @0x8080 with 128bytes

    .....................

    n+256 TX data block @0xff80 with 128bytes

    All data bytes are read back and verified correct.

    Thank you very much.

    Regards,

    Jeff

  • Hi Katie,

    the link you have posted for the SLAU319 download returns error 404, not found. Where can I find these files please?

    Regards,

    Dom
  • Hi Dominic,

    It appears that the download has moved since 2014 - thanks for pointing this out for future users. It can now be found on the MSP-BSL page: http://www.ti.com/tool/mspbsl under BSL-SCRIPTER: software-dl.ti.com/.../index_FDS.html This is also linked from the SLAU319 document www.ti.com/.../slau319

    Regards,
    Katie

**Attention** This is a public forum