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.

simple gpio interrupt example for TMS320C5515

Other Parts Discussed in Thread: TMS320C5515, SPRC133

hello ,  

        i am very much beginer with DSP i have bought a TMS320C5515 for quick learning. but getting very hard time understanding moving ahead. i have searched online for any help but failed , most of links to various source files are dead. 

actually i am trying to implement simple gpio interrupt . whenever a switch connected to gpio pressed an ISR should be executed thats all. 

i believe the  issue is , i could not able to install vector table . 

does anybody have a have a very little complete example for getting Interrupt.

it will be really helpful . 

Thank you 

  • /**
     *  \brief  GPIO interrupt service routine
     *
     *  \param  None
     *
     *  \return None
     */
    interrupt void gpio_isr(void)
    {
    	// Mark rising edg event in flag
    	ModemParameters.SRDY_RiseFLAG = GetBitMask( CSL_GPIO_REGS->IOINTFLG1, 1 << SRDY_GPIO );
    
    	// cleare event flag
    	SetBitMask( CSL_GPIO_REGS->IOINTFLG1,  ( 1 << SRDY_GPIO ) );
    }
    
    extern void VECSTART(void);
    U16 EnableGPIO_Interrupt()
    {
    	/* Disable CPU Interrupts */
    	IRQ_globalDisable();
    
    	/* Clear any pending interrupts */
    	IRQ_clearAll();
    
    	/* Disable all the interrupts */
    //	IRQ_disableAll();
    
    	/* Set the interrupt vector start address */
    	IRQ_setVecs((Uint32)(&VECSTART));
    
    	/* Plug the GPIO Isr into vector table */
    	IRQ_plug( GPIO_EVENT, &gpio_isr );
    
    	/* Enable GPIO Interrupts */
    	IRQ_enable(GPIO_EVENT);
    
    	/* Enable CPU Interrupts */
    	IRQ_globalEnable();
    
    	return CSL_SOK;
    }
    

  • You can download C55x CSL (C55XCSL-LOWPOWER version) from the link http://www.ti.com/tool/sprc133. 

    Check the examples for GPIO at c55xx_csl\ccs_v5.0_examples\gpio. CSL_GPIO_InputPinExample demonstrates interrupt functionality of GPIO module.

    - Pratap.

  • i am very happy to know about this Chip support library i guess this is the thing i was looking for. 

    one more thing i would like to ask is. is this good to always use a library ? 

    what industri people doing the project with DSP do they go bare bone or use some library? 

    sir if wanted to try bare bone,  can anyone  show me how to install vector tables through linker script or any other method? 

     

  • Hi,

    Its suggested to use CSL, as mentioned in the sprc133 description, The C55x Chip Support Libraries (CSL) provide an application programming interface (API) used for configuring and controlling the DSP on-chip peripherals for ease of use, compatibility between various C55x devices and hardware abstraction. CSLs will shorten development time by providing standardization and portability.

    Also, you could refer to CSL API reference guide – SPRU433J. This will also provide the details on creating the linker command files..etc  – refer to section 2.3.1.2

    Hope this helps

    Regards

     Vasanth

  • i believe  i am fairly convinced , library is good option to go thank you very much for your support