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.

Beginning with TMS320F28023 on Custom Board

Other Parts Discussed in Thread: TMS320F28023, TMS320F28027

Hello,

I made a custom board with a TMS320F28023. This is my first time using a DSP (I have used MSP430s in the past). The board connects properly in CCS. I built the gpio_setup tutorial and tried to load the program by pressing ctrl-L. I received this error:  "Data verification failed at address 0x3FA000. Please verify target memory map and memory map. "

If you know what this error is being caused by or what I am doing wrong, that would be great. Also, if you know of any useful tutorials for beginners to C2000s, that would be useful as well.

Thanks,

-Russell Morin

  • Hi Russell Morin,

    The error seems that you are trying to write data which might be protected.

    You have to check data sheet and see whether the addres it mentioned in error message is writable or not.

    and check how it is mapped in your command file used for the project.

    Generally this error is because of the conflict in the actual memory map of the hardware and the memory map command file what we use.

    For more information about c2000, you may visit below link:

    http://focus.ti.com/dsp/docs/dspcontent.tsp?contentId=12618

    which provide wide set of data to learn.


    Regards,

    Mohan

  • Hello Mohan,

    Thank you for your posting. Using the information I found there and elsewhere on the TI site, I have made some progress. I have not made it to the point where I am asked for the 128 bit CSM password for the chip. I received these chips as samples from TI and I did not see any documentation listing a default password. I tried all using 0x0000's and all 0xFFFF's, but I was unable to unlock the chip. Does anyone know the default CSM password for a TMS320F28023?

    Thanks,

    -Russell Morin

  • Hi Russell,

    CSM Password is default 0xFFFF, but once you program it to 0x0000 , you can never unlock the chip.

    Mempory map error is differrent. CSM is differrent.

    To know more about the CSM check in the below link:

    http://processors.wiki.ti.com/index.php/Code_Security_Module_FAQ_for_C2000

  • I didn't think that I had programmed the chip at all. Up until I got to the dialog asking for the password, I had had no success with doing anything. This was the first thing I encountered after installed the proper flash driver for 2802x chips. Is it possible that the chip shipped in a locked state?

    Thanks,

    -Russell

  • I mentioned about CSM as you have stated

     " I tried all using 0x0000's and all 0xFFFF's, but I was unable to unlock the chip."

    If you never programmed, then the issue is something else.

    Chances of chip shipped with locked state is very less.

    It can be something in the custom board. Does your custom board contain an External Watchdog. ?

    This can happen in the case, when the power is not sufficient to the board. Which will reduce the current to the processor. and processor will stay in low power mode.

    Check with your custom board. If chip can be removed , and if you have an ezdsp board, you can check the chip.

  • I don't have an external watchdog on my board. I'll work to verify that I'm supplying the correct power to the chip. I can also remove the DSP and try another of the same DSP to see if the problem persists. I'll try that in the next few days and post any more questions I have.

    -Russell

  • I have used a TMS320F28027 on a custom board before and we had some initial issues.  We fixed these by making sure that the Vcc pins were directly connected to 3.3V, rather than via an inductor (which is shown in some reference designs). So if you have inductors, I suggest you remove them.

    However, your issue actually looks like a linker issue as the address 0x3FA000 is actually reserved in the F28023/27.  Are you able to post your linker (*.cmd) file?

    Tim

  • Hi Tim,

    There are no inductors in my circuit. I have installed the capacitors recommended by the datasheet on the Vcc pins. I measured the voltage at the Vcc pins with my DMM and they read 3.3V.

    I don't think there is a linker issue because one has not come into play. After opening CCS and connecting the board, I chose Tools -> F28xx On-Chip Flash Programmer. I was immediately presented with an "Unlock Flash" dialog box asking for the eight 16 bit keys. I had no chance to open a project with a linker (*.cmd) file because I can't unlock the chip.

    Thanks,

    -Russell

  • I mentioned the linker in response to your original posting regarding the GPIO tutorial example.  However it looks like you may have a separate issue.

    2 ideas:

    1) Make the project run from RAM only.  This will mean no flash programming.  This should be the default case with the GPIO tutorial.  This is controlled by the linker file as well.

    2) Try the gel script Unlock_CSM (should be from the Scripts (or GEL) menu -> Code Security Module -> Unlock_CSM) .  What does this say?

     

    Tim

  • I know I can run programs from RAM, but I want to deploy this chip eventually, so I need to get the flash working. I created a .gel file that looks like this:

    menuitem "DSP2802x GPIO Setup Example"

    hotmenu UnlockCSM()
    {
       Unlock_CSM();
    }

    When I click on the menu item, I get an error that function Unlock_CSM() could not be found. Is there a default gel file I should be using to get this function? I'm using CCS 3.3.

    Thanks,

    -Russell

  • Try looking for a F28023.gel.   I am looking at my gel files for the F28335 on CCS V.4 and it is in the directory ccs/emulation/gel/f28335.gel (if that is any help).

    Or just use this code (from F28023.gel on my PC):

    menuitem "Code Security Module"
    hotmenu Unlock_CSM()
    {
        /* Perform dummy reads of the password locations */
        XAR0 = *0x3F7FF8;
        XAR0 = *0x3F7FF9;
        XAR0 = *0x3F7FFA;
        XAR0 = *0x3F7FFB;
        XAR0 = *0x3F7FFC;
        XAR0 = *0x3F7FFD;
        XAR0 = *0x3F7FFE;
        XAR0 = *0x3F7FFF;

        /* Write passwords to the KEY registers.  0xFFFF's are dummy passwords.
           User should replace them with the correct password for their DSP */
        *0xAE0 = 0xFFFF;
        *0xAE1 = 0xFFFF;
        *0xAE2 = 0xFFFF;
        *0xAE3 = 0xFFFF;
        *0xAE4 = 0xFFFF;
        *0xAE5 = 0xFFFF;
        *0xAE6 = 0xFFFF;
        *0xAE7 = 0xFFFF;

        /* Clear XAR0 register of last value read */
        XAR0 = 0x00000000;

    }

     

    Tim

  • I ran this without any luck. After running it, I click on the F28xx On-Chip Flash Programmer and still get the dialog to unlock the chip.

    Thanks,

    -Russell

  • I haven't used the CCS v3 flash programmer in ages so I cant help you there except to recommend using CCS v4 as the flash programming is much more automated and behind the scenes (press one button and it loads the code to both flash and RAM).

    Tim

  • I am stuck using CCS v3 for now because I only have JTAG drivers which work with CCS v3. My JTAG programmer is a 3rd party unit because I couldn't afford one of the TI programmers.

    I installed another DSP chip (sent in the same sample shipment) today on the same board and the problem persists.

    -Russell

  • Hi..

    Sorry for the delay in replying..

    did you check how much current is consumed by your board, and at the Vcc point of the DSP.

    Since you have tried in RAM, did you correct the cmd file to make it to run in Flash, and is the code now in flash or RAM.

    And if your linker command file is referring to the location , where the CSM would be stored, then that would also be an issue..

    And please dont try to write in location, where there is no access

  • I have not check the current consumption of the board yet (I don't have the tools at home to do it.) I can probably check at work.

    I stopped trying to download a program to RAM a long time ago because I realized that I wanted to store the program in Flash. I have swapped out the DSP chip since then, so any accidental writing I may have done while trying to use RAM is no longer a factor. The problem I am still having is that I try to use the 28xx On-chip Flash Programmer and the software tells me the CSM is locked. I rewired the JTAG connector on my board to match figure 6-3 on page 85 in the TMS320F28023 datasheet, but that did not help.

    Should I have a project loaded in CCS (with the appropriately configured .cmd file) when I am trying to use the 28xx On-chip Flash Programmer?

    Thanks,

    -Russell

  • Hello,

    I have finally figured out my problem which was wiring based. I rewired my JTAG connector to match this schematic of an F28016 board: http://www.olimex.com/dev/images/DSP/TMS320-P28016-REV-A-sch.gif . I also realized that I had accidentally connected the VDD pins to +3.3 at the same time as enabling the internal voltage regulator. It seems that a symptom of double-powering these pins is that the flash appears to be locked. Thanks to everyone for their helpful suggestions.

    -Russell

  • hey,

    Good to hear the issue is solved. Change the state to answered.. so that it will help others as well.