DSPRelated.com
Forums

Re: Hardware Interrupts unexpectedly disabled for short periods of time TMS320C6416

Started by Jeff Brower August 14, 2008
Luc-

> It looks like the hardware interrupts are being disabled for short
> periods of time and I don't understand why. The duration of these
> periods are a few mili-seconds.
>
> I know that the HWI can be disabled during loops if you set the
> opmization level to -o2 or -o3. However, all the files in my
> project have their optimazation levels either set to -o1 or 'None'
> so that is not it.
>
> I looked in the assembly code and it does not mention anything about
> Interrupts being disabled anywhere. The only thing the Headers in
> the .asm files do say is "Interrupt thrhld: Disabled" and I think
> that this is normal since the optimazation levels are really low.
>
> I am familiar with the functions: IRQ_Disable, IRQ_Enable,
> HWI_Disable and HWI_Enable. I inspected the code and they are not
> the cause of this problem. I don't have any self modifying code in
> either my project.
>
> So, what else could be the cause for the HWI to be disabled?
> Are there other events that cause the TMS320C6416 to disable/enable
> interrupts I should be aware of?

What libraries are you linking? You could be calling DSP lib functions that turn
interrupts off inside highly optimized asm code.

A brute-force thing you could do is create a binary image text file using hex6x.exe,
scan that for interrupt disable/enable op-codes, and figure out at which addresses
these occur. Then set breakpoints to discover the culprit code. I always like to
bet young engineers who work for me that something like this actually is in their
code, even though they swear it's not. Haha. Guess who wins.

-Jeff
Luc,

On Thu, Aug 14, 2008 at 4:10 AM, Jeff Brower wrote:
> Luc-
>
>> It looks like the hardware interrupts are being disabled for short
>> periods of time and I don't understand why. The duration of these
>> periods are a few mili-seconds.
>>
>> I know that the HWI can be disabled during loops if you set the
>> opmization level to -o2 or -o3. However, all the files in my
>> project have their optimazation levels either set to -o1 or 'None'
>> so that is not it.
>>
>> I looked in the assembly code and it does not mention anything about
>> Interrupts being disabled anywhere. The only thing the Headers in
>> the .asm files do say is "Interrupt thrhld: Disabled" and I think
>> that this is normal since the optimazation levels are really low.
>>
>> I am familiar with the functions: IRQ_Disable, IRQ_Enable,
>> HWI_Disable and HWI_Enable. I inspected the code and they are not
>> the cause of this problem. I don't have any self modifying code in
>> either my project.
>>
>> So, what else could be the cause for the HWI to be disabled?
>> Are there other events that cause the TMS320C6416 to disable/enable
>> interrupts I should be aware of?
>
> What libraries are you linking? You could be calling DSP lib functions that
> turn
> interrupts off inside highly optimized asm code.
>
> A brute-force thing you could do is create a binary image text file using
> hex6x.exe,
> scan that for interrupt disable/enable op-codes, and figure out at which
> addresses
> these occur. Then set breakpoints to discover the culprit code. I always
> like to
> bet young engineers who work for me that something like this actually is in
> their
> code, even though they swear it's not. Haha. Guess who wins.


Jeff is probably correct, but just to be sure I will ask the question -
Does your code contain *any* stdio functions [printf, time, etc.]??
If so, comment them out and test.
mikedunn
>
> -Jeff
>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Hi,

I want to measure the interrupt latency of my code using the "C6000
Interrupt Latency Detection Feature on the Simulator" available in CCS.

I am using 'C64x+ Cycle Accurate Simulator, Little Endian' on CCS
v3.3.38.2.

I see that this feature is not supported on this simulator (driver cfg
file - simc64plus.cfg).

I am referring to a document 'ug_interrupt_latency_c64plus.doc' for the
procedure. There is nothing mentioned about the simulator types on which
this feature is supported.

Please let me know if this feature is supported only on particular
simulators or I need to install anything else to use this feature on my
simulator.

Awaiting your response.

Thanks & regards,

Akshatha