[SOLVED] TMS470 on J-link with J-Flash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] TMS470 on J-link with J-Flash

    Hello,

    Currently I have a TMS470R1VF67 communicating with JTAG using a J-Link. I'd like the option to use J-Flash to program sectors of the chip but I can't get the chip to agree.

    I can use JCommander with the 'w' commands to write 8bit or 16bits, ect, but I cannot send bulk data as the process will error out.

    Where does Segger get the RAM address of 0x400000? I don't see this reference anywhere else, on any datasheet or anything. My specific TMS470 chip will initialize using TMS470R1B512 settings, which makes sense as it appears very close to what I have.

    Log from J-Flash-
    Connecting ...
    - Connecting via USB to probe/ programmer device 0
    - Probe/ Programmer firmware: J-Link V11 compiled Feb 4 2021 12:59:17
    - Device "TMS470R1B512 (ALLOW KEYS)" selected.
    - Target interface speed: 4000 kHz (Fixed)
    - VTarget = 3.322V
    - TotalIRLen = 4, IRPrint = 0x01
    - JTAG chain detection found 1 devices:
    - #0 Id: 0x3100E02F, IRLen: 04, ARM7TDMI Core
    - Executing init sequence ...
    - Initialized successfully
    - Target interface speed: 4000 kHz (Fixed)
    - CPU clock frequency: 6880 kHz (Auto detected)
    - Found 1 JTAG device. Core ID: 0x3100E02F (None)
    - Connected successfully

    so a connection is made. If I test up/download speed at 0x400200, size of 0x40000 and 3 readings; I get a successful test. Same thing at address 0x400000.

    Log-
    Testing speed ...
    - Speed tested successfully - Completed after 6.526 sec


    but if I try to read any part of the flash, it fails at 0x400200

    Failed Log-
    Reading target memory (0x00000000 - 0x00003FFF) ...
    - Start of preparing flash programming
    - ERROR: Verification of RAMCode failed @ address 0x00400200.
    Write: 0xC5634D43 C04670BD
    Read: 0x00000DA0 84000DA0
    - ERROR: Failed to prepare for programming.
    Failed to download RAMCode!
    - End of preparing flash programming
    - Start of restoring
    - End of restoring
    - ERROR: Failed to read back target memory
    Disconnecting ...
    - Disconnected

    I'm just not sure what this means. Do I have an incorrect RAM address at 0x400000? or is the RAM somehow locked from reading/writing? but it passes the test up/down?

    I can use JCommander and savebin to save the flash out of the TMS470. It will dump the entire 0x0-0x7FFFF contents. I would assume RAM starts at 0x80000 but I'm not sure? JTAG will not initialize at this address.

    I also tried to initialize JTAG at 0x400200 instead of 0x400000 but it will not work there.

    If the chip does have some sort of memory block, is it possible to get around this? Am I completely off base?

    Any help is greatly appreciated.
  • During a CAN reflash, the bootloader is sent to (I assume RAM) at 0x207800. Bootloader is 2kb in size. I assume this is general use RAM and not protected.

    I tried initializing with those specs, work Ram at 0x207800 and 2kb in size. It will initialize but then fail if I try to read anything.

    log-
    Connecting ...
    - Connecting via USB to probe/ programmer device 0
    - Probe/ Programmer firmware: J-Link V11 compiled Feb 4 2021 12:59:17
    - Device "TMS470R1B512 (ALLOW KEYS)" selected.
    - Target interface speed: 4000 kHz (Fixed)
    - VTarget = 3.322V
    - TotalIRLen = 4, IRPrint = 0x01
    - JTAG chain detection found 1 devices:
    - #0 Id: 0x3100E02F, IRLen: 04, ARM7TDMI Core
    - Executing init sequence ...
    - Initialized successfully
    - Target interface speed: 4000 kHz (Fixed)
    - CPU clock frequency: 61928 kHz (Auto detected)
    - Found 1 JTAG device. Core ID: 0x3100E02F (None)
    - Connected successfully
    Reading target memory (0x00070000 - 0x0007D000) ...
    - Start of preparing flash programming
    - ERROR: Failed to prepare target
    - End of preparing flash programming
    - Start of restoring
    - End of restoring
    - ERROR: Failed to read back target memory
    Disconnecting ...
    - Disconnected
  • You have an TMS470R1VF67 but selected a TMS470R1B512 in the J-Link software.

    These two devices are not guaranteed to be compatible from the flash programming point of view.

    We do not give any warranty that what you are doing will work. You are on your own with this.


    The TMS470R1VF67 is not supported by J-Link and support is not planned to be added, as this is a legacy ARM7 based device and this is the 2nd request for supporting it we got, since the device was released by TI a looong time ago.
    Sorry for not having better new here.
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • I understand.

    When I use Jcommander and the W1 or W4 commands I can 'write' to flash, but once I close and reopen the Jcommander terminal and check the flash dump, all my 'written' data is gone. If I check the dump without closing the terminal the data appears to be there...but once I restart Jcommander and check the flash, all my new data is gone.

    Would this be expected to work? or literally nothing should work? same settings as before.

    I'm really in a bind now with a bricked controller that only communicates over JTAG. canbus is dead.
  • Hi,
    Sorry for the delay in response.

    If everything is working correctly, flash can be written with the w* commands.
    As Alex already said however, this might not be the case for your device, as it is not officially supported and might be different regarding flash programming.


    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.