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.

Hercules RM48 USB Stick -- ccs Cannot write to target

Other Parts Discussed in Thread: RM48L950

Using a successfully installed Hercules RM48 USB Stick Development Kit, I imported the RM48 Hercules Demo into my ccs workspace to fix a bug and try downloading code. When I attempt to debug the project, the flash load begins (I can see the JTAG LED flashing) but fails with:

  CortexR4: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.

  CortexR4: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x7ff0 

  CortexR4: Warning: (Error -1003 @ 0x2BC5) Internal error: Invalid parameter passed to function. Restart the application. If error persists, please report the error. (Release 5.0.429.0) 

  Cannot write to target

Is my board defective, or is there something I've overlooked?

-- e

 

  • Hi Doug,

    hard to say what the problem is, did the flash procedure with CCS ever work in you environment?

    Can you please try to erase and program the flash of the device with the standalone nowFlash tool (http://www.ti.com/tool/nowflash).

    Also this thread might help you, if erasing also do not work with nowFlash: http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/136648/491385.aspx#491385

     

    Best Regards,

    Christian

  • Thanks, Christian.

    The device has never worked with CCS.

    Following your advice, I tried nowFLash and it seems to work (Erase, Blank Check, Program, Verify) with No Errors. 

    Then I tried CCS again and it failed the same way.

  • Doug,

    Let us know your CCS version and were you able to connect and write into the RAM using the CCS debug window so far ?

    Regards,

    Pratip

  • Pratip,

    The CCS installed by the RM48 USB Dev Kit DVD is  Version: 4.2.4.00033 

    I'm not sure what you mean about connecting and writing to RAM...

    If I click the Debug icon, or "Debug Active Project" then I get the failure described earlier: cannot erase flash.

    I am able to "Launch TI Debugger" without downloading, and then "Connect Target" seems to work -- it shows a Disassembly listing at least. I can bring up a memory window, and write into address 0x08002000 and it seems to take effect. From there, if I "Load Program" it gives an error message that it cannot write to the device.

    -- e

     

  • Using the TI Debugger, I was able to dump memory; looking at 

    0xFFF87050: 00000000  // so FMAC is set for bank 0

    0xFFF87034: 00000000  // so FBSE is set so bank 0 has flash erasing/writing disabled

    0xFFF8703C: 0000000F // so FBAC is also set for Programming of the OTP sector is disabled

    it appears that my part has OTP registers set so flash writing is disabled...

    is my conclusion correct?

    why would a dev kit ship this way?

    -- e

     

  • Of course, the flash disable doesn't explain why nowFlash reports Programming succeeded (and Verifies!). 

    Does anyone have any insight on whether the flash is really disabled or CCS is broken?

    -- e

  • Doug Currie said:

    Using the TI Debugger, I was able to dump memory; looking at 

    0xFFF87050: 00000000  // so FMAC is set for bank 0

    0xFFF87034: 00000000  // so FBSE is set so bank 0 has flash erasing/writing disabled

    0xFFF8703C: 0000000F // so FBAC is also set for Programming of the OTP sector is disabled

    it appears that my part has OTP registers set so flash writing is disabled...

    is my conclusion correct?

    why would a dev kit ship this way?

    -- e

     

    Doug,

    the registers you look at are not "preprogrammed" by TI these get modified by the TI F021 Flash API. So I don't think that you will see the values the FlashAPI writes to these after you have connected, since erase and programming wasn't executed.

    Doug Currie said:

    Of course, the flash disable doesn't explain why nowFlash reports Programming succeeded (and Verifies!). 

    Does anyone have any insight on whether the flash is really disabled or CCS is broken?

    -- e

    If nowFlash reports successful programming and verify, this should be true. Which means that the flash of the device is OK, and on the other hand that there might be a problem with the CCS build in flash tool.

    For the moment you can use nowFlash to erase and programm the device and than connect and debug to the device with CCS. You just have to disable the build in flash tool in CCS, as you can see in the following screenshot.

     

    Best Regards,

    Christian

  • Doug,

    I tried to reproduce what you have done.

    Importing the CCS Project installed from the DVD which comes with the USB Stick, build the project, load and debug it.

    I guess you have corrected the path for the OUT file and the MAP file, as these where hard coded after the import.

    After correcting the path and filenames I saw, that there comes no Target Configuration file with the project, so you need to create your own. Maybe your problems are because of an incorrect Target Configuration.

    So here a short description how to create the Target Configuration File for the RM48L950:

    1. Right click the "RM48 Hercules Demo" project and choose "Open Target Configuration"
    2. If there is none already create a new one with the dialog which had appeared.
    3. Choose a file name, for example: "xds100v2_RM48_950.ccxml"
    4. Specify "Texas Instruments XDS100v2 USB Emulator" as Connection
    5. Filter for device: "RM48"
    6. Chose the RM48L950 as Device

    Now the new Target Configuration should appeare in the project and should be marked as Active.

    After I did all of the above I was able to Erase, Flash and Debug the device on the RM48 USB Stick with the RM48 Hercules Demo.

     

    Best Regards,

    Christian

  • Christian,

    The Target Configuration was indeed the problem.

    Details: 

    Yes, before the start of this message thread I did correct the paths for MAP and OUT. It was a CCS learning experience. ;-)

    I also thought I had verified the Target Configuration, but apparently it wasn't correct. (TMS570BE was pre-selected). When I created a new one per your instructions and saved it, CCS crashed with an inscrutable Java dialog. I restarted CCS and this time, for the first time, it asked me to create a Target Configuration when I selected that menu item. I created it again, CCS told me I was overwriting the previous version, I said OK. At that point the Erase and Load began to work correctly.

    Thank you for recreating my problem; both of your suggestions were good info and valuable to me.

    Best Regards,

    -- e