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.

F28335 Custom Board loading program error

Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE

Hi,

I have been stuck on this problem for too long now.  I have a board that I made following the F28335 Design Guidelines Document as well as the schematics found in the TMS320F28335 Reference Schematic.  The problem I am encountering happens when I try to load a program onto the chip.  The error is as follows:

C28xx: Writing Flash @ Address 0x003386A2 of Length 0x00000016 (page 0)
C28xx: Erasing Flash Sector A
C28xx: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.
C28xx: Error Writing Flash @ Address 0x0033869E of Length 0x00000016
C28xx: GEL: File: C:\ti\controlSUITE\device_support\f2833x\v132\DSP2833x_examples_ccsv4\timed_led_blink\Debug\Example_2833xLEDBlink.out: Load failed.

Background

  • I am using the LEDBlink sample project provided by TI.
  • I excluded "28335_RAM_lnk.cmd" from build and added "F28335.cmd" to the project
  • I have tried using CCS 6.0 & CCS 5.5 and I observe the same problem.  The compiler I am using is TI v6.2.5
  • I am using the XDS100v2.0 Debugger

Debugging

  1. Before attempting to load the program onto the chip in my custom board I tried loading to the chip on the eZDSP F28335 and it works without problems.
  2. Next I checked that the connections on my custom board are correct in the schematic.  I have pullups on the EMU0 & EMU1 lines of 4K ohms going to the +3.3V line, and I have a pull down of 2.2K ohms on the TRST line.  TCLK & TCLK_RET are tied together.  All the JTAG lines are going to their respective pins on the chip and I did a connectivity test on the physical board to ensure this. XTPD is going to +3.3V.  
  3. I checked device manager on my computer to ensure that the XDS100 emulator was installed correctly and I see that TI XDS100 Channel A is present along with TI XSD100 Channel B is present.
  4. I have run a connection test on the JTAG and it passes on all sections.
  5. I have tried to lower the clock configuration from 30MHz to 10MHz in Flash setting and this did not help.
  6. I have checked my supply lines and I am feeding the uC 1.8V & 3.3V as specified.
  7. I have read through troubleshooting C2000 debugger connection issues (http://processors.wiki.ti.com/index.php/Troubleshooting_C2000_Debugger_Connection_Issues) but nothing seems amiss.

I am not sure what exactly this error means so that I can better debug the problems.  Does anyone have any ideas what else I might be able to do?

  • Alejandro,

    The error message is just saying that the erase operation (first step in flash programming) failed.  It doesn't tell us what the problem is.

    Your item #4 above, you say you ran a connection test on the JTAG and it passed.  Do you mean you clicked "Test Connection" in CCSv5 or 6?

    I'm concerned by your item #5.  You need to specify the clock being used on the board in the flash programmer setup.  If you use a 30 MHz input clock/crystal, the GUI needs to say 30.  If you use a 10 MHz, the GUI needs to show 10, etc.

    Forget about flash programming for the moment, are you able to launch the target configuration, and then connect to the target?  If so, can you reset the device and do a couple of steps in the boot ROM (i.e., hit F5 or do Run->Step)?  Can you open a memory window and change a few memory locations? 

    What I'm getting at here is we need to check your Debugger/JTAG connection before we worry about the flash programming.

    Oh, check your VDD3VFL pin.  Do you have it DIRECTLY connected to 3.3V (no series resistor)?

    Also, you say you are supply 1.8V to the core supply.  What frequency do you intend to run at?  1.8V is only good up to 135 MHz.  You need 1.9V to hit 150 MHz.

    Regards,

    David 

  • David,

    I will test this out in CCS V6

    1) Yes I clicked "Test Connection" in CCSv6 and it passes.

    2) I  have it to match my oscillator at 30Mhz.  I had only tried to lower it as an experiment, but to reiterate it is now at 30MHz.

    3) I excluded "F28335.cmd" from build and re-enabled "F28335_RAM_lnk.cmd" to project, rebuilt, went to debug mode, connected to target (Texas Instruments XDS100v2 USB Emulator_0/C28xx (Suspended)), performed CPU RESET.  At this point I press F5 and I see that it opens a new tab and says "No source available for "0x3ff9ce".  Do you mean open memory browser?  Anyway I am not sure how to change memory locations could you clarify on this please?

    4) I have VDD3VFL directly connected to 3.3V, there is no series resistor.

    5) The exact voltage is 1.89V (1.9V)  This processor was picked to go up to 150MHz.

     

    Thanks,

    -Alex

  • Alex,

    Alejandro Rodriguez1 said:
    3) I excluded "F28335.cmd" from build and re-enabled "F28335_RAM_lnk.cmd" to project, rebuilt, went to debug mode, connected to target (Texas Instruments XDS100v2 USB Emulator_0/C28xx (Suspended)), performed CPU RESET.  At this point I press F5 and I see that it opens a new tab and says "No source available for "0x3ff9ce".  Do you mean open memory browser?  Anyway I am not sure how to change memory locations could you clarify on this please?

    It sounds like your JTAG connection is working OK.  You were able to download code, and step (F5).  The message about no source available is expected.  You don't have source code loaded into CCS for the ROM bootloader, so CCS is telling you this.  It is normal.  Open the disassembly window, and do a few steps.  I think it will work.  This means it is a flash programming problem, and not a JTAG connection problem.  It's also not a code problem or compiler problem.  You're failure is happening at the flash erase step.  This is independent of your code.  This doesn't solve the problem, but at least we're zeroing in on the problem.

    The items 2, 4, and 5 that you responded to in your post sound like you've got the device hooked up correctly on the board.  Yes, you want to make sure you tell the CCS flash programmer the clock source is 30 MHz, as you said you've been doing.

    So this is a puzzle.  Have you tried more than one board?  Maybe something is wrong with this particular board or device.  Something to try.

    Another thing to look at is XCLKOUT pin, if you have access to it.  Power the board without JTAG connected.  You should observe 30MHz/4 = 7.5 MHz clock signal on this pin.  Also, check the XRSn pin.  You should see it pulsing active low at 4.37 ms interval (due to the watchdog timer).  These will probably work, but they are good to confirm.

    One more thing to try: connect to the target (i.e., debug mode), and go to Tools->Flash (something like this).  Scroll the flash programmer window down to the erase sector area.  Uncheck all the sectors except one.  Use any sector except A (because the erase of sector A is what was reported as failing).  Then click the erase button below the sector list.  Does it erase this sector?

    - David

     

  • David,

    1)  Yes in the disassembly window I do see that I can move in steps.

    2)  I have tried two different layouts of boards, the first layout had the power supply only going up to 1.8V, so I did a respin and fixed the voltage regulators to supply 1.9V.  However the problem ovserved in both boards is identical.

    3) I am looking at the XCLKOUT pin but I do not see what you mentioned.  I am seeing a clock signal (square wave) with a frequency of 3.75 MHz.  Looks like its 30MHz/8.  I checked the XCLKOUT signal on the eZDSP and I see a sinusoidal signal with a frequency of 37MHz.

    4) I am seeing the XRSn pin pulsing low at an interval of approximately 4.52ms on my board.

    5) I tried a few things here.  First with 28335_RAM_lnk.cmd enabled and F28335.cmd excluded from build on my custom board.  I went into debug, connected to target, went to on-chip flash and was able to erase all sectors including sector A. The program does not run at this point though, If I press the run button it immediately returns to suspended.  I observe the same results in the eZDSP F28335 board.

    Next I continue using the eZDSP board with F28335.cmd included and 28335_RAM_lnk.cmd excluded from build, I go into debug, it automatically erases flash sectors, loads the program, and pressing the run button causes the light to toggle.

    Now I reconnect my custom board with the same CCS setup and this time when I click debug it does not attempt to erase the flash sectors, instead it immediately spits out this error

    C28xx: Flash Programmer: Error encountered when writing to flash memory
    C28xx: Error Writing Flash @ Address 0x003386A2 of Length 0x00000016 (page 0)
    C28xx: GEL: File: C:\ti\controlSUITE\device_support\f2833x\v133\DSP2833x_examples_ccsv4\timed_led_blink\Debug\Example_2833xLEDBlink.out: Load failed.

    I clicked the option to continue to debug even if load fails, and I once again attempted to manually erase all flash sectors and they all erased sucessfully.

    strange problems... 

    Thanks,

    -Alex

  • Looks like I got it working now.  The giveaway was the discrepency with the XCLKOUT pin that you mentioned.  I adjusted the CLKINDIV (4) and PLLCR Value (4) with OSCCLK (30MHz) to get the frequency at 7.5MHz and it erased and programmed, and my diagnostic LED is blinking as it should.

    Thanks for the help!

    -Alex

  • Alejandro,

    I'm glad it is working.  Not to muddy the waters, but I want to set straight something I said earlier in error.  The reset default for XCLKOUT is OSCCLK/16 (not OSCLK/4).  I forgot that SYSCLKOUT defaults to OSCCLK/4, in addition to XCLKOUT defaulting to SYSCLKOUT/4.  So, XCLKOUT is OSCCLK/16.  Reference the F2833x System Control and Interrupt Users Guide  SPRUFBD0, section 5.2.3.  So, if you reset the device with a 30 MHz CLKIN, you should see 1.875 MHz on the scope.

    Regards,

    David