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.

msp430fr5739 load program error : could not erase device memory

Other Parts Discussed in Thread: MSP430F1611, MSP430FR5739

hello,

I just received some FR5739 samples, and wanted to test them.

I assemble the board, use wire strap from my launchpad to my new board (GND, RST and TEST)

I could connect and download once without any problem (a very simple main{while(1);} ) in order to test debugger.

Problem is that now, I can't donwload anything new on MCU. connection work fine, but error append during memory erase step :

popup :

Launching debug session

Load program Error.

file : C:\Documents and Settings\Administrator\workspace_v5_2\fr_css5\Debug\fr_css5.out : load failed.

       at GEL_load("C:\Documents and Settings\Administrator\workspace_v5_2\fr_css5\Debug\fr_css5.out")

console output :

MSP430: Trouble Writing Memory Block at 0xc200 on Page 0 of Length 0x94: Could not erase device memory
MSP430: GEL: File: C:\Documents and Settings\Administrator\workspace_v5_2\fr_css5\Debug\fr_css5.out: Load failed.

what is strange is that I could donwload and debug one time without problems. If not I would have look deeper on launchpad side.

any idea or things to try ? I'm running out of idea at the moment.

regards

  • For download to FRAM, I found that BSL is more reliable.  6471.BSL Bridge.doc

  • It looks like the tool you're using for 'flashing' the FR doesn't know about FRAM. It tries to erase the FRAM and fails - because FRAM doesn't have to be erased and won't erase by accessing a typical F5x device flash controlelr (which doesn't exist on the FR5x at all).

    The first upload seemd to work because initially, the FRAM was all FF, so the FET assumed the erase operation a success (it was a failure still, but since the memory appeares 'erased', nobody noticed).

    I'm not sure it will work, but maybe you can try teh Elprotronic software. There, you can trigger erase and program as separate steps. Just skip the erase procedure and the erase check and 'just program' it.
    It's also possible that with the proper device selected, the elprotronic software already knows about FRAM and handles it properly.

  • Hello,

    The emulator on the launchpad actually only supports a specific sub-set of G devices.

    It does not support the FR57xx device.

    This board however does: http://www.ti.com/tool/msp-exp430fr5739

    Regards,

    Priya

     

  • Priya Thanigai said:

    Hello,

    The emulator on the launchpad actually only supports a specific sub-set of G devices.

    It does not support the FR57xx device.

    This board however does: http://www.ti.com/tool/msp-exp430fr5739

    Regards,

    Priya

    Please see slaa535.pdf and here is also a "new and improved" way to do it: 3487.BSL Bridge.doc

  • hello,

    first of all, I'd like to thank you for your support.

    I tried FET-Pro430 from Elprotronic, but even if FR devices are liste, write is still not possible :

    =====================================
    JTAG communication initialization.... OK
    Verifying Security Fuse .................... OK
    Flash programming .................... failed
    --------------- FAILED !!! -----------------

     Well that that was worth a try at least.

    I had a look at the FR eval board. Component-wise, emulation part seem quite similar to launchpad. Is there any firmware update possible ? I would appreciate not having to order an additional board.

    I could not try BSL loader, my application board make use of UART pins and I can't really cut those tracks.

  • Pierrick Ausseresse said:
    Flash programming .................... failed

    Well, at least it didn't fail on trying to erase the FRAM :)

    One possible explanation is that the code you flashed on the MSP somehow enters a reset loop, so it resets the MSP while the JTAG is still trying to write.
    Or did the code mess with the memory protection?

    What you can do is trying to attach to the FR through BSL. It doe snowt work on JTAG ant also will definitely work on power-on condition (since the reset line is part of the entry sequence). So it should be unimportant what your already flashed code does or does not. Through BSL you should be able to upload a new firmware or clear the memory.

    It is possible to combine the BSL feature and the use of the hardware UART. Just connect the appropriate pins. BSL usually runs on timer (I'm not 100% sure for the FR). But if your applicaiton does not use the timer pins, then they are high impedance and do not disturp UART operation, whiel the UART pins are high impedance when teh BSL is started. You'll need, however, the other two signals (RTS/DSR?) routed to RST and TEST (or whatever is used on the FR for BSL).

    Pierrick Ausseresse said:
    I would appreciate not having to order an additional board.

    Well, a single chip would be enough- With tat few pins it is possible to replace the MSP and re-use the board. Wiht the 100pin 54xx this is a 'bit' more difficult :) (I've done it successfully more than a few times with the 64pin 1611)

  • the code I donwloaded is main ()  {while(1);}

    nothing else, so I would not expect it to mess with anything. Moreover, code should not be executed before donwload is finisched right ? it would be quite problematic if it were this way.

    using eft-pro tool, I tried to read the full memory. Result show that all memory (FERAM) is cleared (all 0xFF). I wonder if an erase manage somehow or if the very first download did something.

    Basicaly remain two solutions : BSL (that imply track cutting), FR eval board (using RST and TEST signals only). 

    BTW I'm using a custom board with launchpad, so I don't even have a 100pin FR54xx to disolder :)

    I will give a first try with BSL, I keep you informed if it succeed.

  • Pierrick Ausseresse said:
    BSL (that imply track cutting)

    If the two pins used for BSL ar ento used by your applicaiton, then no track cutting is needed, only bridging.

    Pierrick Ausseresse said:
    code should not be executed before donwload is finisched right

    But the very first time it finished, didn't it?

    However, there seems to be no problem with the JTAG connection, which would be a possible if the code somehow causes a reset (well, a watchdog reset is also possible) before the software can stop the CPU after attaching JTAG. Happens especially if there is a long latency caused by USB protocol stack and rather slow software (Eclipse/CCS).
    But this usually results in erroneous 'device fuse blown' or 'device not found' errors.

    Can you try to attachteh debugger wihtout downloading? If this works, you can at least peek into the device.

    Pierrick Ausseresse said:
    using eft-pro tool, I tried to read the full memory. Result show that all memory (FERAM) is cleared (all 0xFF). I wonder if an erase manage somehow or if the very first download did something.

    That's very strange. If memory is clear, a power cycle should put th edevice into the same state as it was on very first time.

    Pierrick Ausseresse said:
    FR eval board (using RST and TEST signals only)

    I don't think using the Eval board with SBW protocol will change anything. I don't know how you program the MSP now, but either you already use SBW, or full JTAG. And SBW is the slower and more sensitive variant.

    However, it's still possible that you somehoe fried the chip on your custom board. Doesn't happen often, but if it happens,. the reactions it may cause are unpredictable. From total malfunction to only partial things not working anymore. Like the FRAM.
    It's not likely, but also not entirely impossible.

  • Hi Pierrick

    I have same problem as you had here, I am playing with a FR5728, and I connected test pin and rst pin to a $4.3 launch pad. I get same error message like yours.

    I don't think it need TX and RX connections during program. what is you suggestion to solve this problem. thank you very much.

  • Pierrick Ausseresse said:
    ...

    I had a look at the FR eval board. Component-wise, emulation part seem quite similar to launchpad. Is there any firmware update possible ?

    ...

    Hardware wise they are identical. Thus one needs to copy the Flash contents from the MSP430F1611 chip of the FR eval board to that of the Launchpad. This is possible if you have another "4-wire" JTAG tool.

  • thank you for your reply, I think it is easier to use BSL to do this, now I have my 2231 programmed, I never used BSL_Scripter or BSLDEMO2 before, BSL_Scripter won't run on my PC, because MSVCR100D need reinstall, but BSLDEMO2 runs OK, I don't know how to use it, I try to search website for a manual or instruction, not luck, do you know how to use this BSLDEMO2, I am going to program FR5728 on my own board.

    David

  • I have used BSLDEMO2 (in a PC) to program FR5738 on a board. I use a Launchpad with a G2xx as the hardware interface between the PC and the FR5738 board. See http://www.ti.com/litv/pdf/slaa535a

  • thank you very much, I will try it. have a great holiday,

  • Dear all,

    I developer a PCB for sample, MCU MSP430FR5739IDA, and after work I try flash this device using Launchapad MSP430 rev 1.4,  as JTAG and it was not possible. Because the emulator give error like:  device not found and after 15 min the error change  for  BLS blown, etc. In other words I lost two day researchimg who can I do for flash my MCU using Launchpad.

    After read same question in this forum, I can see that is possibile flash other MCU using like  MCU MSP430Fr5739 only using EXP430FR5739 board. In this case I buy one and try again flash my MCU and not receive a error, but  when I flash the code go to MCU that is in Board not to my PCB.

    Can any one help me solved this situation ? Please ....

    Thanks,

    Nuno Figueira.

  • The LaunchPad's internal FET officially only supports the MSPs available for the LaunchPad. Inofficially it supports some more of the 2x family, but not the FR devices, or the 1x/4x/5x family or 2x devices without SBW functionality.

**Attention** This is a public forum