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.

Preparing a working project to program into EEPROM

Hi everyone,

I currently have a fully working project which runs both with the evm5515.gel and with a target configuration with no gel file provided. I set up the PLL in the beginning of my main function (as I need to anyway) and have made no other changes.

When I try to create a boot image from the .out file produced and then program it onto the EEPROM, it does not work (as covered in another thread, here http://e2e.ti.com/support/dsp/tms320c5000_power-efficient_dsps/f/109/t/125439.aspx).

Is there anything that I might have missed or have done incorrectly?

Many thanks,

Antony

Edit: I have just checked again and the project does not seem to work with the no-gel file target configuration, I think I may have loaded the other target configuration first to test and then this left everything as it needed to be when I loaded the other.

I have now added the following lines which seem to get it to work with no gel file intermittently, It as worked once, but now the hwafft function I call in the code seems to return all zeros (that is it actually sets the output vectors to zeros rather than simply doing nothing).

SYS_PCGCR1 = 0x0000;
SYS_PCGCR2 = 0x0000;
   
PER_RSTCOUNT = 0x08;
PER_RESET = 0x00fb;   
for (i=0; i< 200; i++);

IDLE_ICR = 0x000E; 

EDIT 2: If I 'reset CPU' from the control panel before I load the code, the hwafft function seems to work once again. What is it changing that needs to be changed?

 

Any ideas?

  • Edit 2 indicates that there is/are bit/bits not getting cleared.

    Regards.

  • Can you think of any that would cause the hwafft to return only zeros?

    Also, I have just got the program to load onto the NOR flash with everything functioning besides the hwafft.

  • I have scoured the TMS3320C5515 DSP System user's guide and I haven't found anything besides ISTR which defaults to the right values, and the setting of which does not fix my problem. Is there somewhere else I should be looking?

  • I also notice that when I try to look at the registers tab in CCS4 the values seem not to be accurate as they indicate peripherals are disabled when they are in fact working, etc. so it makes it hard to observe bits to know what they are at certain times...

  • I wonder if anyone could help me with this as it is standing between me and being able to help my demonstration go well (standalone is always more impressive than seeing something attached to a mass of debugging equipment).

    Everything works perfectly (I2S, LCD, etc.) but the hwafft is returning all zeros. I'm using DSP/BIOS and my startup code at the top of my main function is more or less as follows:

    // PLL set up from RTC
    // bypass PLL
    CONFIG_MSW = 0x0;

    PLL_CNTL2 = 0x8000;
    PLL_CNTL4 = 0x0000;
    PLL_CNTL3 = 0x0806;
    PLL_CNTL1 = 0x87CC;
    while ( (PLL_CNTL3 & 0x0008) == 0);
    // Switch to PLL clk
    CONFIG_MSW = 0x1;
       
    SYS_PCGCR1 = 0x0020;  // Have also tried 0x0000.
    SYS_PCGCR2 = 0x0000;
       
       
    PER_RSTCOUNT = 0x08;
    PER_RESET = 0x00fb;   
    for (i=0; i< 200; i++);

    IDLE_ICR = 0x000E;
    ST0_55 = 0x00;

    Have I missed anything obvious? My code works fine if i load up a target configuration with no gel file IF I reset the cpu, first, but otherwise it will just return zeros.

    Any help would be greatly appreciated!

    Antony

     

  • Is there anyone I can talk to that can help me work this out? I still have had no luck, and basically no response here apart from the obvious...

  • Can someone please let me know why I am not being helped with this problem and am simply being ignored? 

    I really have tried everything I can think of, and I cannot find anyone else reporting that they have had the same problem so that I can learn more about it...

  • Antony,

    I am trying to help. I have gone through the whole process of getting the files from this release link: http://processors.wiki.ti.com/index.php/File:5515evm.zip

    I created a test to blink the XF D2 led on the EVM. I uesd the programmer_C5515_EVM.out to first program the cleaner.bin file; and then program my own xf_blink.bin file. It works on my EVM to blink the XF led 4 times per interval. I have attached the xf_blink.bin for you to confirm your setup is wroking to isolate your issue. Also be sure to use the GEL file in the release link to set PLL to 12MHz before running the programmer.

    Good luck.

    Stevehttp://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/109/1680.xf_5F00_blink.bin

  • Hi Steve,

    Thanks for the response.

    I have tried loading the LED program and it functions properly. The program I am trying to load also functions properly, too, aside from the FFT function which is simply returning zeros - the I2S interrupts operate properly bringing data in, filling buffers and transporting data out, and the LCD code also functions properly (tested independantly, as it has nothing to show but a red line when the HWAFFT gives out zeros).

    This problem does not occur, either when a gel file is used,

    or

    if I perform a cpu reset when connecting to the board before loading the program when a gel file is not used.

    edit - by loading in the above line only i mean running the program via the debugger.

    I have checked through the gel file and anything that I am not doing in my code exists in my code besides the cpu reset - is this something I can/need to put in my code, or is there something that the cpu reset changes that wouldnt normally be reset once the bootloader has completed?

  • Antony,

    This is good info.

    For sure we don't want to use a gel file when boot load a code. So leave this alone.

    Let's focus on second one. The ROM bootloader programs configuration registers during operation and leaves it as it when done. So, I would recommend try adding the cpu reset in your code.

    Regards.

  • Would a cpu reset be disruptive when using DSP/BIOS?

    I also need to research how to actually do a cpu reset in code, as I'm fairly certain that inserting "asm("   RESET");" at the top of my main function wont work (surely it will keep resetting, so how can i get it to do it only once?)...

  • OK, I have finally managed to solve my problem and it turns out I wasnt setting the Idle registers properly... To set them properly (everything enabled) I inserted the following lines at the top of my main function (first line was already present):

     IDLE_ICR = 0x000E;
     asm(" nop_16");
     asm(" nop_16");
     asm(" nop_16");
     asm(" nop_16");
     asm(" nop_16");
     asm(" nop_16");
     asm(" idle");

     

    After doing this my code works perfectly.

    Thanks for the time and support.

     

  • Hi Antony,

    I am trying to Flash my eZDSP C5515 and am facing some issues. My code has SPI and UART communications with other MSPs. It works perfectly when i run from CCS but when i flash , it works for sometime and stops. I have included the PLL clock initialization , peripheral reset and the Idle registers initialization in my main function. Please provide any suggestions . I have been stuck with this issue for quite sometime.