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.

GelReset in evm5505.gel.

Hi:

I am trying to mimic what the GEL does in my code so that I don't get spurious interrupts. I looked at the C5505 GEL file; however, I did not find the code for the function GEL_Reset. Could you please let me know where I can find the code for this function and others?

Thanks a lot!

Cheers,

Mushtaq

  • Hi Mushtaq,

    See Chapter 12 "GEL" in the Code Composer User’s Guide: http://focus.ti.com/lit/ug/spru296/spru296.pdf

    The GEL_Reset() function resets the target system and reloads the monitor. Note that this is a software reset.

    Are you correctly initializing (disabling unnecessary) interrupts at the beginning of your program?

    What kind of spurious interrupts are you seeing?

    Regards,
    Mark

  • Hi Mark:

    I am getting timer interrupts (tim_isr). 

    Here is what I am doing:

     /*  Disable all interrupts and set up vector */
     *(volatile unsigned int *)IER0 = 0x0000;
     *(volatile unsigned int *)IER1 = 0x0000;
     *(volatile unsigned int *)IVPDaddr = IVPD_VALUE;
     *(volatile unsigned int *)IVPHaddr = IVPD_VALUE;

     /* Initialize Interrupt Vector table */
        IRQ_setVecs((Uint32)(&VECSTART));

      *(ioport UInt16 *)(TIAFR) |= TIMER0INT_FLAG + TIMER1INT_FLAG + TIMER2INT_FLAG; // clear pending int flag
      TimerStop(GPTIMER0_BASE);
      TimerStop(GPTIMER1_BASE);
      TimerStop(GPTIMER2_BASE);

     PCGCR1 = 0x00; //This enables the clocks for all peripherals.
     PCGCR2 = 0x00; //This enables the clocks for all peripherals.
        CLKSTOP = 0x0;        // No clock will be stopped 
     PSRCR = 0x0020; //Count of system clock cycles for which SW reset is asserted in the next instruction.
     PRCR  = 0x00ff; // Reset peripherals.
     for(i=0;i<50;i++){}; //Wait.
     //uart Set EBSR once and don't mess with it.
     EBSR = 0x1A00; //UART, SPI, I2S2, GPIO, and EMIF.

    I also tried the following from the GEL file evm5505.gel:

        /* Disable interrupts */
        *(int*)0x0003 = *(int*)0x0003 | 0x0800; // Set INTM
        *(int*)0x0000 = 0;      // Clear IER0
        *(int*)0x0000 = 0;      // Clear IER1

    However, it did not help.

    Thanks a lot!

    Cheers,

    Mushtaq