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.

Programming Flash of TMS320F2812 through Serial port

Other Parts Discussed in Thread: TMS320F2812

Hi,

I am using SdFlash utility V3.3 for programming flash of TMS320F2812 serially.

I am not using ez-dsp kit. I have my own board.

I have done all the related settings of SdFlash utility, but my device is not getting connect.

It is giving error failed to connect.

Some body  reply me on this.

 

 

  • Hi,

    There's a number of things which can affect the "connect" status when using SDFlash Serial:

    Have you tried lowering the baud rate? (the documentation should tell you which option to change to do this). 

    Are your boot pins set up properly so that you are booting to SCI? (to check this, you can also load the symbols of the boot ROM .out file provided wiht the boot ROM user guide for 281x in CCS and put a hardware breakpoint in SCI bootloader to make sure you are jumping there... )

    Additionally, what frequency input clock do you use on your board? the 2812 SDFlash Serial algorithm is based off of a 30 MHz input clock frequency. If this changes, you need to re-build the algorithm based on the instructions in the SDFlash serial documentation. Otherwise you will have trouble connecting.

  • Hi,
     
       Thanks for your  reply.
       I have tried by lowering baud rate.
       All boot pins are set properly.
       Can you focus on your second point.
       Actually i have tried with the toggle test also but it is also not working.
       On my board clock frequency is 30Mhz only.
       Kindly reply on this.
     
  • Shinoy -

    When I say lowering the baud rate - I mean lowering the baud rate in SDFlash Serial options - it seems you have done this.

    30 Mhz clock frequency is fine.

    Try checking to see that you are making it into the SCI boot mode properly. To do this:

    1. Connect CCS  via your JTAG port (but also have SDFlash Serial open).

    2. Download the boot ROM release code from the web: http://www.ti.com/litv/zip/spru095c Unzip the package.

    3. In CCS, connect to the target, and open the f2812_boot_rom.pjt file. Then go to File->Load Symbols->Load Symbols Only. Then navigate to the f2812_boot_rom.out file in the /Debug directory of the software package you unzipped in step 2.

    4. Open SCI_Boot.c and in the SCI_Boot() function set a hardware breakpoint at "SCIA_SysClockEnable".

    5. Reset the target

    6. Hit RUN.

    7. Now in SDFlash, try to Erase-Program-Verify

    * Check to make sure that in the CCS window, your PC stops at the breakpoint you set in the SCI_Boot() function. If not, it means you are not properly booting to SCI. If this happens, try steps 4-7 again, but this time set the breakpoint in the "SelectMode_Boot.c" file in "SelectBootMode()" AFTER the following line:   "BootMode = GPIODataRegs.GPFDAT.all & MODE_MASK;"  Once the program stops after this line at the breakpoint you set, single step through each line to see which boot mode you are ending up in.

     

    Now if none of the above works, check to make sure that you are not connecting your serial cable through a laptop docking station - for some reason SDFlash Serial does not work through a laptop docking station, it occasionally also has problems working through a USB->RS232 dongle.  There are also some other suggestions in the SDFlash Serial documentation.  
      

  • Hi,

        Thanks for your reply.

         I have downloaded the spru095c and followed all the above steps you have mentioned.

         When i am connecting J-TAG and loading the f2812_boot_rom .out file and then tried to programmed flash through SDFlash, then all the three options i.e. ERASE,PROGRAM and VERIFY are working.

       But if i am removing the J-TAG and if tried to reload the flash through SDFlash, then again the same message is coming.Failed to connect the target.

     Correct me if i am wrong, this means without the f2812_boot_rom .out file,my SCI-A boot loader is not getting activated.

     How to get this activated.

     

     

     

     

  • Hi guys,

           A great utility for programming the flash through the serial port is C2000Prog by CodeSkin. It is free and works better than SDFlash in many instances. Try it and see if it helps with your issues, although they sound like they might be more on the processor side.

    www.codeskin.com

    Charlie

  • When there are some problems with SDFlash, I`m always monitoring the transmission between board and pc with AccessPort, try this, check is there some answer from board, etc.

  • But check the Booting whther it is booting to   SCI-A .

    Next Connecting wire connections between PC and  your board . They must be proper to get connected .

     

    This was the issue which i faced while serially flashing ... Simpliest things are ones we always miss out on !

  • And about Flashing working with CCS and SD Flash .. The problem is with the wire connections or booting .

    Believe me it has nothing to do with baud rate or the ultility . I think with SDFlash comes  a project F2808.sdp . in it you have to change only .out File . thats it

  • Hello CChang,

    I am also having a problem with programming over the serial port.

    I have tried loading the boot ROM release code and stepping through after Starting the Erase in SDFlash, it is stopping at

    // Wait until we correctly read an
        // 'A' or 'a' and lock   
        while(SCIARegs.SCIFFCT.bit.ABD != 1) {}

    in SCIA_AutobaudLock().

    I have set the Autobaud in SDFlash to 0004 (9600baud), so I don't think I can go any lower?

    The fact that I am getting to SCIA_AutobaudLock makes me think that I have configured the SCI boot mode correctly in hardware.

    That is, I am pulling SCITXDA to ground through a 2K2 resistor.

    Is there anything special I need to do with the SCIRXDA?

    I have tested that the transceiver I am using works, by loading some inhouse code through JTAG and sending some basic commands that require responses over the serial port.

    The crystal I am using has a frequency of 17.1776MHz and this is being run at 10/2 - 85.888MHz. Perhaps this is a problem?

    Any further advice would be most helpful.

     

     

     

  •  

     

     

    Hi,

    As you are mentioning that the SYSCLKOUT is 85.8MHz, I am guessing that you are re-invoking the bootROM using a debugger reset.  Please look at the errata related to bootROM at http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprz193l&fileType=pdfSCI bootloader code does not correctly clear the Auto-Baud Detect bit in the SCIFFCT register.  Hence if the SCI bootloader is re-executed, autobaud lock will not happen.  Make sure this is not a part of the issue you are debugging.

    If you are not re-executing the SCI boot code and see that autobaud lock is not happening, then try reducing the baud rate.  Slew rate limitations effect the sampling/detection of the baud signal at higher baud rates.

    Regards,

    Vamsi

     

     

     

  • Hi Vamsi,


    Thank you for your response to my problem.

    I mentioned the SYSCLKOUT because in order to use the correct SDFlash .out files, I had to rebuild the .out with changes to the CPU_RATE inside the F2811SerialFlash project. I changed this from

    #define CPU_RATE    6.667L

    to

    #define CPU_RATE    11.643L

    and I thought that this might be a problem.

    When I try to program the F2811 with SDFlash and no debugging in CCS, the following occurs.

    I power on the hardware.

    The power light comes on - the F2811 has already had its Flash programmed using JTAG with some code that will make LEDs flash - but the F2811 LEDs do not flash - so I believe it has selected SCI boot mode and is waiting for an Erase/Program/Verify.

    SDFLash is opened, the F2811 project is loaded and I select Device->Flash and then I choose Erase.

    It fails to connect to the tag according to SDFlash and the F2811 seems to have jumped out of SCI boot mode and into the Flash code as the F2811 LEDs start flashing.

    I have the baud rate at 9600 and I don't think I can go any lower.

  • Hi

    I am using SDFlash utility to program F28335 FLASH serially. You said that " it occasionally also has problems working through a USB->RS232 dongle".  My laptop has only USB port (No docking station) and I can use only USB-RS232 dongle to download the code. Can you please suggest any solutions for this?

    I checked the USB-RS232 cable by shorting Tx and Rx and used hyper terminal to verify it. It works. I also checked the BOOT ROM GPIO settings for SCI-A mode.  I am always getting the error "ERR: Failed connection to the target".  I also tried to lower the baud rate. That also didn't work.

    Also, Is SDFlash utility is a standalone utility. Can I install it some other PC that has COM port and check serial FLASH programming?

    Thank you,

    Jaiganesh

  • Hello,

    I had the same problem with autobaud, which was working fine with some PCs and not with others. After a lot of frustration, I figured what the problem is: the autobaud feature located in the TMS320 ROM checks the width of the start bit of the 'a' character which is sent to start downloading the bootloader file. This method is sensitive to mismatches between the rise time and fall times of the RS232 signal created by the interface hardware, cables, etc... This mismatch becomes more and more important with increasing speeds and limits the autobaud proper operation. I found that 19200 Bds works all the time, but I could reach 115200 Bds with a good RS232 interface (ironically provided by a cheap Profilic USB-RS232 interface). My original PC hardware showed a bit more than one microsecond discrepancy between rise and fall times, enough to limit the autobaud to a maximum of 28800 Bds.

    It would have been wiser to check the width of two consecutive bits of opposite polarity (example start bit and 1st bit of the 'a' character) and measure the average to determine the baud rate. This would have cancelled the effect of difference between rise and fall times and allow reaching much higher speeds.

    Jean Bizouard

  • Hello,

    I had the same problem with autobaud and I'd like to kown if there any solution to set manually the baud rate ? For my application, the baud rate will never change but I need to be tolerant to bit time mismatch.

    Thank you for helping me.

    Antony