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.

evm5515 code composer 3.3 +dsp/bios

I'm running the following code , which I copied from CSL . this code defined gpio pin 4 as input pin falling edge interrupt:

    CSL_Status           status;
    CSL_GpioPinConfig    config;

    /* Disable CPU interrupt */
    IRQ_globalDisable();

 /* Clear any pending interrupts */
 IRQ_clearAll();

 /* Disable all the interrupts */
 IRQ_disableAll();

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

 /* Open GPIO module */
    hGpio = GPIO_open(&GpioObj,&status);
    if((NULL == hGpio) || (CSL_SOK != status))
    {
        return GPIO_OPEN_FAILED;
    }

 /* Reset the GPIO module */
    GPIO_reset(hGpio);


    /** test GPIO_config API to make PIN4 as i/p */
 config.pinNum    = CSL_GPIO_PIN4;
    config.direction = CSL_GPIO_DIR_INPUT;
    config.trigger   = CSL_GPIO_TRIG_FALLING_EDGE;
    status = GPIO_configBit(hGpio,&config);
 if(CSL_SOK != status)
 {
  return GPIO_CONF_FAILED;
 }

 /* Enable GPIO interrupts */
    status = GPIO_enableInt(hGpio,CSL_GPIO_PIN4);
 if(CSL_SOK != status)
 {
  return GPIO_EN_INT_FAILED;
 }

 /* Clear any pending Interrupt */
    IRQ_clear(GPIO_EVENT);

    IRQ_plug(GPIO_EVENT,&gpio_ISR);

     /* Enabling Interrupt */
    IRQ_enable(GPIO_EVENT);
    IRQ_globalEnable();
   

 

during compilation I'm getting the following warning:

">> warning: creating output section vectors without SECTIONS specification"

 

what does it mean?

 

 

  • Hi,

     

    Can you check your .cmd file in your project? Your VECTOR section may not be assigned.

    Regards,

     

  • I thought.cmd file is created automatically according to the setting in the configuration tool.

    can .cmd file be changed?

  • Hi,

     

    If you are not using BIOS, you need to add .cmd to your project.

    Regards,

    Hyun

  • I removed the interrupt setting from the above code and I'm using the BIOS for INTERRUPT setting as followeing:

    1. The gpio_init() procedure init gpio pin4 as input interrupt and falling edge

    int8 gpio_init(void)
    {
    CSL_Status status;
    CSL_GpioPinConfig config;

    /* Open GPIO module */
    hGpio = GPIO_open(&GpioObj,&status);
    if((NULL == hGpio) || (CSL_SOK != status))
    {
    return GPIO_OPEN_FAILED;
    }

    /* Reset the GPIO module */
    GPIO_reset(hGpio);


    /** test GPIO_config API to make PIN4 as i/p */
    config.pinNum = CSL_GPIO_PIN4;
    config.direction = CSL_GPIO_DIR_INPUT;
    config.trigger = CSL_GPIO_TRIG_FALLING_EDGE;
    status = GPIO_configBit(hGpio,&config);
    if(CSL_SOK != status)
    {
    return GPIO_CONF_FAILED;
    }
    /* Enable GPIO interrupts */
    status = GPIO_enableInt(hGpio,CSL_GPIO_PIN4);
    if(CSL_SOK != status)
    {
    return GPIO_EN_INT_FAILED;
    }

    return GPIO_OK;
    }

    2. using the bios configuration tool  I define HWI_INT21 calbk function

    bios.HWI.instance("HWI_INT21").fxn = prog.extern("gpio_ISR");

    bios.HWI.instance("HWI_INT21").useDispatcher = 1;

    3. implement gpio_ISR() clbk functio

     


    void

    gpio_ISR(void)
    {

    CSL_Status status;

    /* Check for GPIO Interrupt Flag Register */
    if((1 == GPIO_statusBit(hGpio,CSL_GPIO_PIN4,&status)))
    {
    /* Clear GPIO Interrupt Flag Register */
    GPIO_clearInt(hGpio,CSL_GPIO_PIN4);
    IRQ_disable(GPIO_EVENT);


    /* Read data on pin 4 */
    //status = GPIO_read(hGpio, CSL_GPIO_PIN4, &readVal);
    fp_sync_interrupt();
    IRQ_enable(GPIO_EVENT);

    }

    }

     

    I can see the line toggled on scope _____|                   |____

    But the interrupt  routine is not called.

     

     

  • Hi,

    Are you enabling GPIO global interrupts in IER?. You can do it using IRQ_enable(GPIO_EVENT);

    Pratap.