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/TMS320C6655: How do i use CIC ? I want to link MCBSP's RINT with CPU interrupt.

Part Number: TMS320C6655
Other Parts Discussed in Thread: TMS320C6416

Tool/software: Code Composer Studio

Hi.

I am developing system by using TMS320C6655 instead of TMS320C6416.

I want to make program to link MCBSP's RINT with CPU interrupt.

I have already prepared configration of MCBSP read / write .

Could you please teach me how to use CIC and give me sample program?

Regards.

Masatoshi

  • Hi Masatoshi,

    The most detailed tutorial on CIC is the following wiki:
     

    Have you checked it?
    Best Regards,
    Yordan

  • Hello, Yordan.

    Thank you for your reply and advice.
    I have read through the relevant items in the DSP document on the official website,
    I haven't read the wiki about Chip interrupt Controller.
    If you would like, can you please tell me the specific description about CIC and the example page for reference?

    Best regards

    MASATOSHI

  • Hi,


    I've notified the McBSP expert. However have in mind that response will be delayed due to Thanksgiving in the US.

    Best Regards,
    Yordan

  • Here is the correct link to Interrupt configuration using CIC provided on the wikis:

    http://processors.wiki.ti.com/index.php/Configuring_Interrupts_on_Keystone_Devices

    There is an example provided in section 3.1.3 and 3.2.4. 

    Specifically for McBSP reference , you can refer to our McBSP driver and example in Processor SDK RTOS C665x but I suspect the driver uses DMA interrupt setup to move data from MCBSP FIFO to RX buffer to generate the interrupt.

    HEre is an example of UART Interrrupt connection to CPU interrupts using CIC  for reference on C66x:

    void KeyStone_UART_Interrupts_Init(Bool bRxIntEnable, Bool bEDMAInterruptEnable)
    {
    	if(C6670_EVM==gDSP_board_type
    		||DUAL_NYQUIST_EVM==gDSP_board_type
    		||TCI6614_EVM==gDSP_board_type)
    	{	
    		uiCIC_out_num= 64;//CIC out 64 is INTC input 22
    	}
    	else if(C6678_EVM==gDSP_board_type)
    	{	
    		uiCIC_out_num= 33;//in C6678, CIC out 33 is also INTC input 22
    	}
    	else
    	{
    		puts("Unknown DSP board type!");
    		return;
    	}	
    
    	if(DNUM<4) //for core 0, 1, 2, 3
    		CIC_Regs= gpCIC0_regs;
    	else
    		CIC_Regs= gpCIC1_regs;
        
    	/* Disable Global host interrupts. */
    	CIC_Regs->GLOBAL_ENABLE_HINT_REG= 0;
    
    	/* Configure no nesting support in the CPINTC Module. */
    	CIC_Regs->CONTROL_REG= ((CIC_Regs->CONTROL_REG&
    		~CSL_CPINTC_CONTROL_REG_NEST_MODE_MASK)|
    		(CPINTC_NO_NESTING<<CSL_CPINTC_CONTROL_REG_NEST_MODE_SHIFT));
    
    	/*map UART ERR INT, RX EVT, and EDMA CC2 GINT to CIC out*/
    	KeyStone_CIC_event_map(CIC_Regs, CSL_INTC0_UARTINT, uiCIC_out_num);
    	KeyStone_CIC_event_map(CIC_Regs, CSL_INTC0_URXEVT, uiCIC_out_num+1);
    #ifdef CSL_INTC0_UARTINT1
    	KeyStone_CIC_event_map(CIC_Regs, CSL_INTC0_UARTINT1, uiCIC_out_num);
    	KeyStone_CIC_event_map(CIC_Regs, CSL_INTC0_URXEVT1, uiCIC_out_num+1);
    #endif
    	KeyStone_CIC_event_map(CIC_Regs, CSL_INTC0_CPU_3_2_EDMACC_GINT, uiCIC_out_num+2);
    
    	/* Enable Global host interrupts. */
    	CIC_Regs->GLOBAL_ENABLE_HINT_REG= 1;
    
    	/* map UART ERR interrupt to INT4 */
    	/* map UART RX interrupt to INT5 */
    	/* map EDMA GINT to INT6 */
    #ifdef CSL_GEM_CIC0_OUT_64_PLUS_10_MUL_N 	//for C6670, TCI6614
    	gpCGEM_regs->INTMUX1 = 
    		(CSL_GEM_CIC0_OUT_64_PLUS_10_MUL_N<<CSL_CGEM_INTMUX1_INTSEL4_SHIFT)|\
    		(CSL_GEM_CIC0_OUT_65_PLUS_10_MUL_N<<CSL_CGEM_INTMUX1_INTSEL5_SHIFT)|\
    		(CSL_GEM_CIC0_OUT_66_PLUS_10_MUL_N<<CSL_CGEM_INTMUX1_INTSEL6_SHIFT);
    #else  //for C6678
    	gpCGEM_regs->INTMUX1 = 
    		(CSL_GEM_INTC0_OUT_33_PLUS_11_MUL_N_OR_INTC0_OUT_33_PLUS_11_MUL_N_MINUS_4<<CSL_CGEM_INTMUX1_INTSEL4_SHIFT)|\
    		(CSL_GEM_INTC0_OUT_34_PLUS_11_MUL_N_OR_INTC0_OUT_34_PLUS_11_MUL_N_MINUS_4<<CSL_CGEM_INTMUX1_INTSEL5_SHIFT)|\
    		(CSL_GEM_INTC0_OUT_35_PLUS_11_MUL_N_OR_INTC0_OUT_35_PLUS_11_MUL_N_MINUS_4<<CSL_CGEM_INTMUX1_INTSEL6_SHIFT);
    #endif
    	/* enable INT4, 5, 6 */
    	CPU_interrupt_enable((1<<4)|(bRxIntEnable<<5)|(bEDMAInterruptEnable<<6));
    }

    Please let us know if you have any further questions regarding this issue.

    Regards,

    Rahul

  • Yordan

    Thank you for notifying the specialist


    Rahul


    Thank you for your reply.
    I read the URL that was presented, and I plan to program interrupts using the SYS / BIOS method.

    I have a question here, what is the difference between HWI and CpIntc?
    Both look like programs that associate system interrupts with host interrupts.
    Looking at the example, I feel like I can do it only with HWI,
    Do I need to set both HWI and Cpintc?

    If so, do you agree with the following recognition?
    HWI: Set system interrupt and host interrupt, and incorporate the processing at the time of interrupt
    Cpintc: Process in which SYS / BIOS initializes, recognizes and permits, and maps system interrupts and host interrupts

    I ’m looking forward to your reply.

    Best regards.


    Hashimoto