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.

CCS/TMS320C5505: USB Stick Bootloader // EEPROM programming

Part Number: TMS320C5505

Tool/software: Code Composer Studio

Dear team,

one of our customers faces the following issue:

we bought some C5505 USB Stick evaluation boards which we used for the first tryouts. We managed to
make them work with the Audio Codec boards what we got from TI, everything is working fine so far.

But recently I started to check it out how could we use the bootloader to load the code automatically on startup
to the DSP without using the JTAG. I searched a lot on google to find a solution how to boot from the EEPROM
which is on the evaluation board. I found the demo code for this board on the forum and I also found several versions
of the application which should run first on the C5505 to update the content of the EEPROM. So far it was also working
I managed to download the EZ_demo.bin file from TI to the EEPROM and after restarting the board it booted and was working fine.

Our problem is now if I try to create a binary file on my own from my projects .out file when I load it to the EEPROM it does
not seem to work. I used the programer.out file the spi_writer.out and some USBKey.out file as well for programming.

They all work with the EZ_demo.bin but non of them with my files. I would assume that the copying part is working fine and
we have a problem at the creation of the .bin file. I managed to download the source of the EZ_demo project as well,
and when I built it on my own and created the .bin file out of it, it had a size of 39kbytes. The version which I downloaded
from TI has a size of 5kbyte. The 39byte version is again not working at all.

 

Here is my post build script what I use to create the .bin file from the .out file:

${CG_TOOL_ROOT}\bin\hex55 -boot -v5505 -serial8 -b -o TestApp.bin ${ProjName}.out

 

I tried to create a simple LED blinking project just for testing if the bootloader is working.

It is working with JTAG fine. I removed the .gel file from the application. I moved the necessary parts from the .gel file to my actual code
to initialize the pll and the peripherals and everything but the led is still not blinking.

Once I managed to make it blink but then it was really slow like if the pll would not be set correctly but I think it was.

 

Could you please help us to find out what might be the problem? Unfortunately there are really not much information on the Internet
to be found on this topic I read all the relevant pdfs and articles but it still does not seem to work for some reason.


We use CCS 6.1 and I used the 4.4.1 version of the hex55 tool to generate the bin file.


Thanks,

Peter

  • Hi Peter,

    I've notified the sw team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Peter,
    Could you please try to use the stand-alone hex55 tool as described here to generate a .bin?
    processors.wiki.ti.com/.../C5515_Boot-Image_Programmer

    Please see if that works.

    Lali
  • Dear Lali,

    we tried everything what was written on the Wiki page what you sent us. Basically the bootloader itself seems to work because even in our actual project I see that the LED is blinking which is ok but the problem is that the peripherals are not initialized properly because the I2S and I2C interfaces are not doing anything but with the JTAG they are working fine. I tried to do the same what I read earlier in the forum to copy some parts of the GEL file in to my code to do the initialization in my code. If I don`t use the GEL file in my project, then the peripherals are also not working even with JTAG.

    Here is the codepart from someone on this forum which I call first in my code:


    #define PLL120MHz 0
    #define PLL100MHz 1
    #define PLL75MHz 0
    #define PLL60MHz 0
    #define PLL40MHz 0

    #define ESCR 0x1c33

    #define SDTIMR1 *(volatile unsigned ioport *) 0x1020
    #define SDTIMR2 *(volatile unsigned ioport *) 0x1021
    #define SDCR1 *(volatile unsigned ioport *) 0x1008
    #define SDCR2 *(volatile unsigned ioport *) 0x1009
    #define SDSRETR *(volatile unsigned ioport *) 0x103C
    #define SDRCR *(volatile unsigned ioport *) 0x100C

    #define PRCR *(volatile unsigned ioport *) 0x1C05
    #define PCGCR1 *(volatile unsigned ioport *) 0x1c02
    #define PCGCR2 *(volatile unsigned ioport *) 0x1c03
    #define PSRCR *(volatile unsigned ioport *) 0x1c04

    #define CCR2 *(volatile unsigned ioport *) 0x1c1f
    #define CGCR1 *(volatile unsigned ioport *) 0x1c20
    #define CGCR2 *(volatile unsigned ioport *) 0x1c21
    #define CGCR3 *(volatile unsigned ioport *) 0x1c22
    #define CGCR4 *(volatile unsigned ioport *) 0x1c23
    #define CCSSR *(volatile unsigned ioport *) 0x1c24
    #define DIEIDR3*(volatile unsigned ioport *) 0x1C43
    #define IVPD *(volatile unsigned ioport *) 0x0049

    void Peripheral_Reset()
    {
    int i;

    *(short *)PSRCR= 0x0020;
    *(short *)PRCR= 0x00BB;

    for(i=0;i<0xff;i++);
    *(short *)IVPD = 0x027F; // Load interrupt vector pointer
    }

    void SetupPLL()
    {
    int i;

    /* Enable clocks to all peripherals */
    *(short *)PCGCR1 = 0x0;
    *(short *)PCGCR2 = 0x0;

    /* Bypass PLL */
    *(short *)CCR2 = 0x0;

    /* Set CLR_CNTL = 0 */
    *(short *)CGCR1 = *(short *)CGCR1 & 0x7FFF;

    if(PLL100MHz)
    {

    *(short *)CGCR2 = 0x8000;
    *(short *)CGCR4 = 0x0000;
    *(short *)CGCR3 = 0x0806;
    *(short *)CGCR1 = 0x8BE8;
    }


    /* Wait for PLL lock */
    for(i=0;i<0x7fff;i++);

    /* Switch to PLL clk */
    *(short *)CCR2 = 0x1;
    }

    The LED is blinking with the same speed in both cases but with JTAG + GEL File the Audio Codec on the stick is producing an output but from the EEPROM it is just blinking.

    Any help would be appretiated.

    Thanks in advance!

    Best regards

    Gergely

  • I did some further measurements and it seems that everything is working fine but the DSP is not sending anything to the Codec on the Data line. That seems to be the only difference now if I use it with or without Bootloader. Either the DMA or the I2S is not initialized properly with the Bootloader. I think the script above should initialize all the peripherals at startup.

    Did someone have the same problem?

  • In the meanwhile I managed to solve the problem. After restarting the peripherals and before setting up the PLL I had to add the following lines:

    *(ioport volatile unsigned *)0x0001 = 0x000E;
    asm(" idle");

    I read it in some document, that the bootloader turns off some FFT HWA and MPORT, and with these two lines those can be activated again. I have no idea what are they or what do they have to do with my I2S but this change solved my problem completely.