DSPRelated.com
Forums

Re: Problem in CCS

Started by Jeff Brower June 21, 2007
Vijay-

> I work on 5402 dsp and face a strange problem in CCS(ver 3.1). That
> was a old project which never used interrupts. Both C and asm files
> are there. C for main\algorithm\logic and asm for low level drivers.
> No interupt was used in that project.
>
> Now i want to add a timer interrupt and came to know [thru Simulator]
> that when a C funtion is called with parameters, CCS uses memory
> location 0x00, 0x01, 0x02 respectively, to pass parameters, instead
> of stack And now they are eventually interrupt registers
>
> 0x00 - IMR
> 0x01 - IFR
>
> So the interrupt never worked!
>
> i read somewehere that CCs uses STack and not these addresses but in
> reality its using these memlocs to pass parameters...
> whats the way to make CCS to use stack?
> how to avoid CCS from corrupting interupt Registers....
>
> Bhooshan and other Experts, help me!!

Somehow you have not set the CPL bit in ST1 register. CCS normally sets this bit
when generating code, but I'm guessing you have some asm code somewhere that kills
the bit.

Look in the C54x CPU Reference Guide for more information on the CPL bit:

http://focus.ti.com/lit/ug/spru131g/spru131g.pdf

-Jeff

PS. I changed the group addr to be c54x, not c6x.