Hi,
I am very new to C6701 programming. Can someone help me out with a sample program for setting the external interrupts using CCS on C6701.
Regards,
Pramod
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.
I don't have any code handy but I can help with an outline. Also, Chapter 5 in the CPU Reference Guide provides a good starting point for learning about TI DSP interrupts.
- By default, EXT_INT[7:4] are tied to hardware interrupts 7-4, respectively (see p13 of C6000 DSP Interrupt Selector). This means you still need to enable the appropriate bit in the Interrupt Enable Register (IER) for whichever external interrupt you choose. For example, if you use EXT_INT4 you will need to set IER bit 4 high (IER |= 0x10). Additionally, you need to enable the Global Interrupt Enable (GIE) inside the Chip Status Register (CSR). See p39 of the CPU Reference Guide for more info on the CSR, and p43 for more on the IER.
- You also need to create an interrupt vector for that interrupt. If you are unfamiliar with interrupts in general take a look at section 5.1.2 on p400 of the CPU Reference Guide. This is usually just a few lines of assembly code which contains a branch to the Interrupt Service Routine.
I hope this is a useful starting point, but let me know if you run into any specific issues and we can help work you through them.
Tim,
Thanks for the detailed reply. I haven't really starting programming since I have had problems with my board. Now I have started programming, but got stuck with some doubts.
I am not able to get the base address for the Control registers registers you had mentioned. For eg ICR has offset of 0x3, IER has offset of 0x4, and ISR has offset of 0x2. Hope this is correct. But I am not getting any reference to the base address anywhere in the document.
Another doubt is regarding the registers in the doc "TMS320C6000 DSP Interrupt Selector Reference Guide". This document talks about 3 registers MUXH, MUXL, and EXTPOL. Is it required to set these registers for getting ready for the external interrupts.
Could you please clarify these doubts.
Thanks & Regards,
Pramod