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.

TMS320C6748: How to handle unused INT

Genius 5920 points
Part Number: TMS320C6748

Hi experts,

My customer is writing NonOS software using the TMS320C6748. Please let me check "5 Interrupts" in "TMS320C674x DSP CPU and Instruction Set User's Guide".

Q1: Regarding the Interrupt Service Table (IST), if there are INTX that are not used, is it possible to remove them from the IST? Or do I need to define the unused INTX as a "Dummy interrupt service routine" as in the following thread?
URL: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/12245/c6748-timer-interrupt

For example, as shown below, if I use only NMI and INT4,5,6,11,12, I want to remove INT1,2,7~10 and put them in the upper side of the table. They are planning to build a system using only internal RAM, and the goal is to keep the code size as small as possible.

My idea is to use hardware to determine the priority of INTs and determine the pointers as described in "5.1.2.2 Interrupt Service Table Pointer (ISTP)". Therefore, I believe that it is not possible to delete INTX, but please let me confirm this just in case.

Q2: If I need to define a "Dummy interrupt service routine" for an unused INTX and write it in assembly language, is there any problem if I use only the "B IRP" and "NOP 5" instructions?
In "9.5.2 ISR with Hand-Coded Assembly" of "TMS320C6000 Programmer's Guide (Rev. K)", it is assumed that INTX is used. I believe that there is no problem in writing the code as shown in the thread referred to in Q1.

Beset regardds,
O.H

  • Hi O.H.

    You can't remove the entries for the unused interrupts. If you do not expect that interrupt to happen in your system, possibly route them to an exception or trap.

    By the way, are you on SYS BIOS or Bare metal code (using CSL library)?

    Hope it helps.

    Thanks

  • Hi Aravind Batni,

    Thank you for your reply.

    Is it correct to assume that the size of the program code will be the same if I define "Dummy Service Routine" or if I don't define anything?
    (Is there no need to define interrupts that are not expected to be used in the first place because they will be thrown into exceptions or traps...?)

    When I defined an interrupt service routine that does not perform any processing as a "Dummy Service Routine", the "B IRP" and "NOP 5" alone used 8 KByte of size.
    I couldn't confirm the program code size when nothing is defined (when it is not expected to be used).

    They are referring to STARTERWARE. Since they are originally using C6713 and plan to write it in assembly language, they are referring to this.

    Best regards,
    O.H

  • Hi O.H,

    When I defined an interrupt service routine that does not perform any processing as a "Dummy Service Routine", the "B IRP" and "NOP 5" alone used 8 KByte of size.

    Can you please explain what you mean by above? The Branch is a 4 byte instruction and NOP 5 is another 4 byte instruction. The ISTP should not be exceeding 512 bytes (32 bytes X 16 = 512 bytes) for all the interrupts. I don't understand your comment on this using 8KBytes of size.

    As mentioned above, if the ISR is too large, to fit in the single fetch packet, additional branch to may be needed to complete the ISR. But for unused interrupts, there is no processing needed and I expect the provided 32 byte slot is good enough . There is a slot for 8, 32 bit instructions to be filled in for ISTP for every interrupt. The offset locations are fixed and hence you would need 512 bytes at least for this. (even though you do not use other interrupts).

    Hope this is clear and please let me know, if you think this did not address the customer questions.

    Thanks

  • Hi Aravind Batni,

    When I defined an interrupt service routine that does not perform any processing as a "Dummy Service Routine", the "B IRP" and "NOP 5" alone used 8 KByte of size.

    Sorry. I made a mistake in my description. The correct description is "the "B IRP" and "NOP 5" alone used 8 Byte of size".

    I defined an interrupt function that is not used and created a code that does not do any processing. The code is created from a new project, and main just executes "hello.c" (printf Hellow world). As a result of commenting out the INT4 process referring to "interrupt.c" of STARTERWARE, the program code was placed as shown below.

    So, I thought that if I used "B IRP" and "NOP 5", the size used would be 8 bytes, and the code size would be smaller than if I did not define anything. However, since IST requires 32 bytes (20h), I conclude that my code probably does not handle interrupts well.

    I will contact you if the customer could not solve the problem. Thanks for your support.

    Best regards,
    O.H

  • Hi O.H,

    Sure.. Please let me know if you need any further inputs to be addressed. For the time being I will close this thread. You can reopen this thread or open a new one with this reference.

    Thanks