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.

Tms320LF2407A booting from EEPROM

Other Parts Discussed in Thread: TMS320LF2407A, MAX232

 Hello,

 I am a newbee in DSP controllers and would like some troubeshooting help to make the TMS320LF2407A boot from an atmel 25256 EEPROM. As of now I have made the necessary hardware changes according to the reference guide, "TMS320LF/LC240xA DSP Controllers Reference Guide, System and Peripherals", Appendix D. But even after make those necessary changes, the data does not seem go from the EEPROM to the DSP controller board.

I have stored the .out file in the EEPROM. The .out file came after compiling the C code and was then stored in the EEPROM. According to the reference guide if the necessary hardware changes are made, then the DSP will automatically boot from the EEPROM after reset, but somehow its not happening.

Any suggestions how to troubleshoot this problem? 

 

 

  •  Hi Tranz.

    I have not used any othe boot mode tahn boot from internal flash, so my information may not be correct, but as far as I know you should convert .out file in pure hex format with supplied conversion tool (look for it in the folder wher code generation tools are).

     Did you check the clock and data lines when booting - is there any activity. If there is not, check the boot pins (XF/booten, IOPC2) how are they set when the DSP comes out of reset.

     

    Regards, Mitja

     

  •  Well I loaded the .out file directly on to the EEPROM, also I was able to monitor it via LCD and it was able to convert it to hex before loading. I also checked the clock and data lines after reset, the clock line is working but only momentarily, and the data lines does not show anything on it.

     Will I be able to see the data in the DSP program or the data memory space if all goes well?

     Any other debugging suggestions?

     

    Regards

     Tranz

     

  • Hello Tranz!

    Thoroughly read SPRU357 TMS320LF/LC240xA DSP COntrollers Reference Guide, Appendix.

    Where do you want your code to load (DARAM, SARAM)? 

    Did you append destination addres to hex file before sending it to EEPROM?

    Check how many bytes are transfered when at boot time. If only two four it is possible that you supplied the wrong destination address (LSB, MSB or MSB, LSB) which resulted in illegal addres NMI. You can debug the boot code by manualy setting boot_enbit in SCSR2. The code for boot code is also in the referenced document.

     

    Regards, Mitja

     

     

  •  Thanks Mitja for your response,

    Sorry for the late reply, unfortunately I just found out that the ultimate objective which I wanted to reach by loading the bootload onto the EEPROM would not be possible with this process. What I wanted to do was to see the data that I program onto the EEPROM come to the DSP flash i.e. program or the data memory ( which now seems impossible). The method proposed by TI for that is to create an API utility which calls all the functions for serial programming. 


    http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=spraaq2

    The utility is to be created using these files. 


    http://focus.ti.com/docs/toolsw/folders/print/sprc141.html
     

    So to reprogram the DSP flash this seems to be the only method available. It would be of great help if anybody has this utility for 2407A, cause TI does not have one, they only have this utility available for 2812.  :( 

     Being the newbee I think it will be a tedious task, but somebody got to do it. Kindly let me know if anyone has this utility available, it would be of great help.

     Thanks again

     Tranz

  •  Hi Tranz!

    I don't mind the late reply, as it is not mine work which depends on this corespondence.

    As you described your probllem more in detail I recommend the following:

    1.The DSP should boot from FLASH, initialize peripherals, copy bootload funcion to SARAM and call it.

    2. This function would then clear and erase (if I remember correctly the FLASH procedure) dedicated FLASH sector, in which the data from EEPROM will be located.

    3. Then it reads EEPROM word by word and it programs it to FLASH (you could allocate a buffer if there is any avaliabile SARAM, to transfer data from EEPROM to buffer and than put the whole buffer into FLASH at once). Of course any interrupts should be disabled during flash operations (I think that 24x FLASH API handles this already).

    4. When whole EEPROM is written to FLASH bootload functions transferes program control back to where it was called from (preferably with indication of succes or failure)

    Of course it is you who should write the bootload function, but I think itis not so difficult (basicly is just FLASH API CLEAR, ERASE, read from EEPROM, call FLASH API WRITE , repeat until finished). Probably most difficult step is to correctly load and run this function as it takes some editing of linker command file (.cmd)

    Good luck

    Regards, Mitja

     

     

  •  Thanks Mijita,

     

    The DSP is going to boot from the FLASH, but do I load the basic code via the emulator ? See that is also one of the problems, I have to reprogram the FLASH without using the emulator. Ok let me describe my project a bit more.

     

    At the end of the day I would like to create a system which would be capable of re-installing DSP code into its FLASH without the use of the emulator or PC. For this as of now I have an embedded board ( consisting microchip's PICs) which is acting as a user interface ( Hyperterminal ) and is connected to the EEPROM and the DSP controller board. So if this system is possible to build, the user would able to use a hyperterminal and send the file he would like to load on to the DSP flash,

    which would reinstall the DSP flash memory with the new code.

    Regards

     Tranz

  •  Hi Tranz!

     If I understand you correctly you want to put code and data from EEPROM to FLASH? Now the EEPROM can be read and writen to from DSP and also from PIC. And if PIC is connected to PC via RS232 or USB the PIC receives code and data, PIC puts it into EEPROM and the next time the DSP boots, it reads the EEPROM, reprograms itself and starts executing new code. Correct me if I am wrong.

    If I understand the DSP will not at any timewrite to the EEPROM? If this is the case why don't you use built-in bootcode and SD Flash utility (http://emulators.spectrumdigital.com/utilities/sdflash/) to directly put the code into DSP via RS232 port? This way you would not need PIC and an EEPROM, only level translator chip (e.g. MAX232).

    Regards, Mitja