DSPRelated.com
Forums

HWI using dsp bios.

Started by muneeb abid December 2, 2008
Hello

can anyone guide me about configuration of HWI using DSP bios...
I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios function HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.

As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers

Thanks in advance for reply

-Muneeb
Hi,

I have not used C6455 DSP. I would suggest u have a look at C6455 fixed-point
DSP user guide. There should be something like Interrupt Event Number (maybe
over 100 interrupt sources), which connect HWI_int4 to INT4. You can check your
DSP/BIOS configuration as well.

Regards,
C. Yang
________________________________

From: muneeb abid [mailto:m...@yahoo.com]
Sent: Wed 03/12/2008 14:23
To: christophe blouet
Cc: Yang, Chunhua; c...
Subject: RE: ??: [c6x] HWI using dsp bios.
Thanks for the reply

yes i am enabling the GIE bit and corresponding IER bit in main function . but
when i give the int4 pin...there is no change in the IFR bit. but if i manually
triger IFR bit to give intrupt the function is called and works properly. is
there a way to connect HWI_INT4 to INT4. i am using DSK6455 and DSP BIOS 5.31.
I have seen in some example there is a filed to tell the intrupt source like
"external_pin4". but i cant see any field to specify the intrupt source. so i
think HWI_int4 is connected to INT4 by default.

what am i doing wrong ?.

Thank again for the reply

--- On Wed, 12/3/08, christophe blouet wrote:
From: christophe blouet
Subject: RE: ??: [c6x] HWI using dsp bios.
To: c...@liv.ac.uk, m...@yahoo.com, c...
Date: Wednesday, December 3, 2008, 4:04 AM

GIE has to be enabled in all the cases
You can maybe check the Mask of the interrupts and check interrupt
vector address

Regards

________________________________

To: m...@yahoo.com; c...
From: c...@liv.ac.uk
Date: Tue, 2 Dec 2008 21:47:34 +0000
Subject: ??: [c6x] HWI using dsp bios.

HI,

For DSP/BIOS application, before main() function, all BIOS modules have
been initilised. Main function is usually used for you own application
initialisation (e.g. your own hardware initilisation). Also, in main function,
global interrupt enable should not be allowed. So, You may try to interrupt when
running in a task object.

Hope this works.

Regards,

C. Yang

________________________________

From: c... ?? muneeb abid
Sent: 2008-12-2 (???) 12:53
To: c...
Subject: [c6x] HWI using dsp bios.

Hello

can anyone guide me about configuration of HWI using DSP bios...
I am putting the isr function in HWI object( in my case i am using HWI 4) . and
in main i am calling DSP bios function HWI_disable and HWI_enable. and then
while loop. and processor wait for the intrupt.

As i give the intrupt signal my ISR is not called and i dont see any change in
IER and IFR registers

Thanks in advance for reply

-Muneeb
Dear Muneeb,

I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be you can try the following to fix your issue.

1. Please remove the infinitive loop within the main. Since DSP/BIOS will run after it exit the main function (run to the end of the main function). So if add an infinitive loop within the main DSP/BIOS will never run.

2. GIE will automatically enable when the program exit form main to run the DSP/BIOS so enable GIE is not a must.

3. Please add your corresopnding event number into the field "DSP/BIOS->Scheduling->HWI->HWI_INTx->General Tag->Interrupt selection number"

Hope it can help you to fix your issue.

Best Regards,
Albert Siu

--- 2008年12月2日 星期二,muneeb abid 寫道﹕
寄件人: muneeb abid
主題: [c6x] HWI using dsp bios.
收件人: c...
日期: 2008 12 2 星期二 上午 4:53


Hello

can anyone guide me about configuration of HWI using DSP bios...
I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios function HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.

As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers

Thanks in advance for reply

-Muneeb
Hello

thank you for the detail reply.

Yes i have removed the while loop from the main .But when i run the programm the programm is not halting. is that normal?.

Yes i have given the intrrupt slection number to 4 . which means the intrupt is connected to INT4?.

GIE is enabled and i am also enablung the 4th bit of IER to ebale the INT4 . but still i am giving the intrupt to then ping INT4 ...nothing happens to IFR register and fucntion is not called. but if i manually change the 4th bit of IFR the function is called and it works fine..it seems that INT4 bit is not connected properly and not trigering the IFR register.
Can you tell me what is wrong i am doing. and can you guide me about the functionality of ECM.?

thank you agains for all the help and replies.

--- On Wed, 12/3/08, h...@yahoo.com.hk wrote:
From: h...@yahoo.com.hk
Subject: Re: [c6x] HWI using dsp bios.
To: c..., m...@yahoo.com
Date: Wednesday, December 3, 2008, 6:01 PM

Dear Muneeb,

I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be you can try the following to fix your issue.

1. Please remove the infinitive loop within the main. Since DSP/BIOS will run after it exit the main function (run to the end of the main function). So if add an infinitive loop within the main DSP/BIOS will never run.

2. GIE will automatically enable when the program exit form main to run the DSP/BIOS so enable GIE is not a must.

3. Please add your corresopnding event number into the field "DSP/BIOS->Scheduling->HWI->HWI_INTx->General Tag->Interrupt selection number"

Hope it can help you to fix your issue.

Best Regards,
Albert Siu

--- 2008年12月2日 星期二,muneeb abid 寫道﹕
寄件人: muneeb abid
主題: [c6x] HWI using dsp bios.
收件人: c...
日期: 2008 12 2 星期二 上午 4:53


Hello

can anyone guide me about configuration of HWI using DSP bios...
I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios function HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.

As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers

Thanks in advance for reply

-Muneeb
Muneeb-

> thank you for the detail reply.
>
> Yes i have removed the while loop from the main .But when i run
> the programm the programm is not halting. is that normal?.

Yes that's Ok. Your program should not halt unless you select Debug | Halt on CCS menu. If you manually halt, then
you can look at the source code that CCS shows when it stops and verify that some type of DSP/BIOS code is running
(i.e. not your code).

> Yes i have given the intrrupt slection number to 4 . which means
> he intrupt is connected to INT4?.
>
> GIE is enabled and i am also enablung the 4th bit of IER to ebale the
> INT4 .

If you removed the loop from main(), then in which code do you set IFR?

> but still i am giving the intrupt to then ping INT4

Exactly which pin is connected? Suggest you give the exact signal name and pin number -- there may be some confusion.
Also, how do you verify that you are pulsing the pin? Do you have a dig scope connected? You have to be sure there
really is a 3.3V active low pulse, exceeds minimum width, etc.

-Jeff

> ...nothing happens to IFR register and fucntion is not called.
> but if i manually change the 4th bit of IFR
> the function is called and it works fine..it seems that INT4
> bit is not connected properly and not trigering the IFR
> register.
> Can you tell me what is wrong i am doing. and can you guide me
> about the functionality of ECM.?
>
> thank you agains for all the help and replies.
>
> --- On Wed, 12/3/08, h...@yahoo.com.hk wrote:
> From: h...@yahoo.com.hk
> Subject: Re: [c6x] HWI using dsp bios.
> To: c..., m...@yahoo.com
> Date: Wednesday, December 3, 2008, 6:01 PM
>
> Dear Muneeb,
>
> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be you can try the following to fix your issue.
>
> 1. Please remove the infinitive loop within the main. Since DSP/BIOS will run after it exit the main function (run to
> the end of the main function). So if add an infinitive loop within the main DSP/BIOS will never run.
>
> 2. GIE will automatically enable when the program exit form main to run the DSP/BIOS so enable GIE is not a must.
>
> 3. Please add your corresopnding event number into the field "DSP/BIOS->Scheduling->HWI->HWI_INTx->General
> Tag->Interrupt selection number"
>
> Hope it can help you to fix your issue.
>
> Best Regards,
> Albert Siu
>
> --- 2008年12月2日 星期二,muneeb abid 寫道﹕
> 寄件人: muneeb abid
> 主題: [c6x] HWI using dsp bios.
> 收件人: c...
> 日期: 2008 12 2 星期二 上午 4:53
> Hello
>
> can anyone guide me about configuration of HWI using DSP bios...
> I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios function
> HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.
>
> As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers
>
> Thanks in advance for reply
>
> -Muneeb
I have made a function to enable IER and GIE bit .  when there is an intrupt IFR bit will be set to 1?.

I am using the external intrupt pin 4 on Peripheral Expansion Connector DSK6455. which is connected with FPGA. and i am giving the interrupt signal  from FPGA and checking the signal from logic analyzer. i have read that the INT4 pin is active low and to give intrupt we have to keep pin at 0 for atleast 2 clk cycles and the interrupt is buffered at rising edge. 
.

--- On Thu, 12/4/08, Jeff Brower wrote:
From: Jeff Brower
Subject: Re: [c6x] HWI using dsp bios.
To: "Muneeb Abid"
Cc: c...
Date: Thursday, December 4, 2008, 1:45 PM


Muneeb-

> thank you for the detail reply.

>

> Yes i have removed the while loop from the main .But when i run

> the programm the programm is not halting. is that normal?.

Yes that's Ok. Your program should not halt unless you select Debug | Halt on CCS menu. If you manually halt, then

you can look at the source code that CCS shows when it stops and verify that some type of DSP/BIOS code is running

(i.e. not your code).

> Yes i have given the intrrupt slection number to 4 . which means

> he intrupt is connected to INT4?.

>

> GIE is enabled and i am also enablung the 4th bit of IER to ebale the

> INT4 .

If you removed the loop from main(), then in which code do you set IFR?

> but still i am giving the intrupt to then ping INT4

Exactly which pin is connected? Suggest you give the exact signal name and pin number -- there may be some confusion.

Also, how do you verify that you are pulsing the pin? Do you have a dig scope connected? You have to be sure there

really is a 3.3V active low pulse, exceeds minimum width, etc.

-Jeff

> ...nothing happens to IFR register and fucntion is not called.

> but if i manually change the 4th bit of IFR

> the function is called and it works fine..it seems that INT4

> bit is not connected properly and not trigering the IFR

> register.

> Can you tell me what is wrong i am doing. and can you guide me

> about the functionality of ECM.?

>

> thank you agains for all the help and replies.

>

> --- On Wed, 12/3/08, hkas2008-all@ yahoo.com. hk wrote:

> From: hkas2008-all@ yahoo.com. hk

> Subject: Re: [c6x] HWI using dsp bios.

> To: c6x@yahoogroups. com, muneeb_abid@ yahoo.com

> Date: Wednesday, December 3, 2008, 6:01 PM

>

> Dear Muneeb,

>

> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be you can try the following to fix your issue.

>

> 1. Please remove the infinitive loop within the main. Since DSP/BIOS will run after it exit the main function (run to

> the end of the main function). So if add an infinitive loop within the main DSP/BIOS will never run.

>

> 2. GIE will automatically enable when the program exit form main to run the DSP/BIOS so enable GIE is not a must.

>

> 3. Please add your corresopnding event number into the field "DSP/BIOS->Scheduli ng->HWI-> HWI_INTx- >General

> Tag->Interrupt selection number"

>

> Hope it can help you to fix your issue.

>

> Best Regards,

> Albert Siu

>

> --- 2008年12月2日 星期二,muneeb abid 寫道﹕

> 寄件人: muneeb abid

> 主題: [c6x] HWI using dsp bios.

> 收件人: c6x@yahoogroups. com

> 日期: 2008 12 2 星期二 上午 4:53

>

>

> Hello

>

> can anyone guide me about configuration of HWI using DSP bios...

> I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios function

> HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.

>

> As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers

>

> Thanks in advance for reply

>

> -Muneeb













Muneeb-

> I have made a function to enable IER and GIE bit .  when
> there is an intrupt IFR bit will be set to 1?.

Ya.. but u call this function from main(), right? Since ur a newbie, I don't think it's a good idea to be messing
with IER, IFR when DSP/BIOS has not finished initializing yet. If you want to call user functions that play with
interrupts, you should do it from a one-time or periodic task (set the task up in DSP/BIOS). And be careful to
restore any interrupt settings that you might temporarily change.

> I am using the external intrupt pin 4 on Peripheral Expansion
> Connector DSK6455. which is connected with FPGA. and i
> am giving the interrupt signal  from FPGA and checking the
> signal from logic analyzer. i have read that the INT4 pin
> is active low and to give intrupt we have to keep pin at 0
> for atleast 2 clk cycles and the interrupt is buffered at
> rising edge. 

Ok, you're giving an expansion connector signal and you don't seem to know the actual DSP pin name. On 6455 it could
be GPINT4, it could be something else... it makes a big difference when configuring HWI in DSP/BIOS. You need to go
and look at the DSK 6455 schematic, figure that out and report back.

-Jeff

> --- On Thu, 12/4/08, Jeff Brower wrote:
> From: Jeff Brower
> Subject: Re: [c6x] HWI using dsp bios.
> To: "Muneeb Abid"
> Cc: c...
> Date: Thursday, December 4, 2008, 1:45 PM
>
> Muneeb-
>
>> thank you for the detail reply.
>
>>> Yes i have removed the while loop from the main .But when i run
>
>> the programm the programm is not halting. is that normal?.
>
> Yes that's Ok. Your program should not halt unless you select Debug | Halt on CCS menu. If you manually halt, then
>
> you can look at the source code that CCS shows when it stops and verify that some type of DSP/BIOS code is running
>
> (i.e. not your code).
>
>> Yes i have given the intrrupt slection number to 4 . which means
>
>> he intrupt is connected to INT4?.
>
>>> GIE is enabled and i am also enablung the 4th bit of IER to ebale the
>
>> INT4 .
>
> If you removed the loop from main(), then in which code do you set IFR?
>
>> but still i am giving the intrupt to then ping INT4
>
> Exactly which pin is connected? Suggest you give the exact signal name and pin number -- there may be some confusion.
>
> Also, how do you verify that you are pulsing the pin? Do you have a dig scope connected? You have to be sure there
>
> really is a 3.3V active low pulse, exceeds minimum width, etc.
>
> -Jeff
>
>> ...nothing happens to IFR register and fucntion is not called.
>
>> but if i manually change the 4th bit of IFR
>
>> the function is called and it works fine..it seems that INT4
>
>> bit is not connected properly and not trigering the IFR
>
>> register.
>
>> Can you tell me what is wrong i am doing. and can you guide me
>
>> about the functionality of ECM.?
>
>>> thank you agains for all the help and replies.
>
>>> --- On Wed, 12/3/08, hkas2008-all@ yahoo.com. hk wrote:
>
>> From: hkas2008-all@ yahoo.com. hk > Subject: Re: [c6x] HWI using dsp bios.
>
>> To: c6x@yahoogroups. com, muneeb_abid@ yahoo.com
>
>> Date: Wednesday, December 3, 2008, 6:01 PM
>
>>> Dear Muneeb,
>
>>> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be you can try the following to fix your issue.
>
>>> 1. Please remove the infinitive loop within the main. Since DSP/BIOS will run after it exit the main function (run
>> to
>
>> the end of the main function). So if add an infinitive loop within the main DSP/BIOS will never run.
>
>>> 2. GIE will automatically enable when the program exit form main to run the DSP/BIOS so enable GIE is not a must.
>
>>> 3. Please add your corresopnding event number into the field "DSP/BIOS->Scheduli ng->HWI-> HWI_INTx- >General
>
>> Tag->Interrupt selection number"
>
>>> Hope it can help you to fix your issue.
>
>>> Best Regards,
>
>> Albert Siu
>
>>> --- 2008年12月2日 星期二,muneeb abid 寫道﹕
>
>> 寄件人: muneeb abid > 主題: [c6x] HWI using dsp bios.
>
>> 收件人: c6x@yahoogroups. com
>
>> 日期: 2008 12 2 星期二 上午 4:53
>
>>>> Hello
>
>>> can anyone guide me about configuration of HWI using DSP bios...
>
>> I am putting the isr function in HWI object( in my case i am using HWI 4) . and in main i am calling DSP bios
>> function
>
>> HWI_disable and HWI_enable. and then while loop. and processor wait for the intrupt.
>
>>> As i give the intrupt signal my ISR is not called and i dont see any change in IER and IFR registers
>
>>> Thanks in advance for reply
>
>>> -Muneeb
>
>
Muneeb-

> --- On Thu, 12/4/08, Jeff Brower wrote:
> From: Jeff Brower
> Subject: Re: [c6x] HWI using dsp bios.
> To: "Muneeb Abid"
> Cc: c...
> Date: Thursday, December 4, 2008, 3:00 PM
>
> About IER bit...if i am not configering the bit of IER
> ..Bios will do that ?. i didnt get the idea . who is
> responsible to configure the IER bit? is that the
> programmer or the DSP bios?

DSP/BIOS.

> And i have checked the sechematic of the DSK . The pin on DSP is GP[7].

Then you need to select the correct interrupt number for GPIO7, right? Not "INT4". In the 6455 data sheet, there is
mention of "Event Numbers", and of course, there is an event number for GPIO7, so that's something you have to look
into. Your next task -- figure out correct HWI settings for GPIO7.

-Jeff
> Muneeb-
>
>> I have made a function to enable IER and GIE bit .  when
>> there is an intrupt IFR bit will be set to 1?.
>
> Ya.. but u call this function from main(), right? Since ur a newbie, I
> don't think it's a good idea to be messing
> with IER, IFR when DSP/BIOS has not finished initializing yet. If you want to
> call user functions that play with
> interrupts, you should do it from a one-time or periodic task (set the task up
> in DSP/BIOS). And be careful to
> restore any interrupt settings that you might temporarily change.
>
>> I am using the external intrupt pin 4 on Peripheral Expansion
>> Connector DSK6455. which is connected with FPGA. and i
>> am giving the interrupt signal  from FPGA and checking the
>> signal from logic analyzer. i have read that the INT4 pin
>> is active low and to give intrupt we have to keep pin at 0
>> for atleast 2 clk cycles and the interrupt is buffered at
>> rising edge. 
>
> Ok, you're giving an expansion connector signal and you don't seem to
> know the actual DSP pin name. On 6455 it could
> be GPINT4, it could be something else... it makes a big difference when
> configuring HWI in DSP/BIOS. You need to go
> and look at the DSK 6455 schematic, figure that out and report back.
>
> -Jeff
>
>> --- On Thu, 12/4/08, Jeff Brower wrote:
>> From: Jeff Brower
>> Subject: Re: [c6x] HWI using dsp bios.
>> To: "Muneeb Abid"
>> Cc: c...
>> Date: Thursday, December 4, 2008, 1:45 PM
>>
>> Muneeb-
>>
>>> thank you for the detail reply.
>>
>>>> Yes i have removed the while loop from the main .But when i run
>>
>>> the programm the programm is not halting. is that normal?.
>>
>> Yes that's Ok. Your program should not halt unless you select Debug |
> Halt on CCS menu. If you manually halt, then
>>
>> you can look at the source code that CCS shows when it stops and verify
> that some type of DSP/BIOS code is running
>>
>> (i.e. not your code).
>>
>>> Yes i have given the intrrupt slection number to 4 . which means
>>
>>> he intrupt is connected to INT4?.
>>
>>>> GIE is enabled and i am also enablung the 4th bit of IER to ebale the
>>
>>> INT4 .
>>
>> If you removed the loop from main(), then in which code do you set IFR?
>>
>>> but still i am giving the intrupt to then ping INT4
>>
>> Exactly which pin is connected? Suggest you give the exact signal name
> and pin number -- there may be some confusion.
>>
>> Also, how do you verify that you are pulsing the pin? Do you have a dig
> scope connected? You have to be sure there
>>
>> really is a 3.3V active low pulse, exceeds minimum width, etc.
>>
>> -Jeff
>>
>>> ...nothing happens to IFR register and fucntion is not called.
>>
>>> but if i manually change the 4th bit of IFR
>>
>>> the function is called and it works fine..it seems that INT4
>>
>>> bit is not connected properly and not trigering the IFR
>>
>>> register.
>>
>>> Can you tell me what is wrong i am doing. and can you guide me
>>
>>> about the functionality of ECM.?
>>
>>>> thank you agains for all the help and replies.
>>
>>>> --- On Wed, 12/3/08, hkas2008-all@ yahoo.com. hk > yahoo.com. hk> wrote:
>>
>>> From: hkas2008-all@ yahoo.com. hk
>>
>>> Subject: Re: [c6x] HWI using dsp bios.
>>
>>> To: c6x@yahoogroups. com, muneeb_abid@ yahoo.com
>>
>>> Date: Wednesday, December 3, 2008, 6:01 PM
>>
>>>> Dear Muneeb,
>>
>>>> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may be
> you can try the following to fix your issue.
>>
>>>> 1. Please remove the infinitive loop within the main. Since DSP/BIOS
> will run after it exit the main function (run
>>> to
>>
>>> the end of the main function). So if add an infinitive loop within the
> main DSP/BIOS will never run.
>>
>>>> 2. GIE will automatically enable when the program exit form main to
> run the DSP/BIOS so enable GIE is not a must.
>>
>>>> 3. Please add your corresopnding event number into the field
> "DSP/BIOS->Scheduli ng->HWI-> HWI_INTx- >General
>>
>>> Tag->Interrupt selection number"
>>
>>>> Hope it can help you to fix your issue.
>>
>>>> Best Regards,
>>
>>> Albert Siu
>>
>>>> --- 2008年12月2日 星期二,muneeb abid > yahoo.com> 寫道﹕
>>
>>> 寄件人: muneeb abid
>>
>>> 主題: [c6x] HWI using dsp bios.
>>
>>> 收件人: c6x@yahoogroups. com
>>
>>> 日期: 2008 12 2 星期二 上午 4:53
>>
>>>>> Hello
>>
>>>> can anyone guide me about configuration of HWI using DSP bios...
>>
>>> I am putting the isr function in HWI object( in my case i am using HWI
> 4) . and in main i am calling DSP bios
>>> function
>>
>>> HWI_disable and HWI_enable. and then while loop. and processor wait
> for the intrupt.
>>
>>>> As i give the intrupt signal my ISR is not called and i dont see any
> change in IER and IFR registers
>>
>>>> Thanks in advance for reply
>>
>>>> -Muneeb
The interrupt event for GIP7 is 58. In event manager i gave the function name to myIsr as well. And IER register is not enabled and not even IFR when i give the intrupt.

There is nothing more about the hardware seting just that the interrupt should remain at 0 for more then 2 clock cycles and then get high.

Should i use csl_intc to prgramm the intrupt. But i can not use dsp Bios with intc. I have heard it is easy to programm interrupt using DSP BIOS .

--- On Fri, 12/5/08, Jeff Brower wrote:
From: Jeff Brower
Subject: Re: [c6x] HWI using dsp bios.
To: "Muneeb Abid"
Cc: c...
Date: Friday, December 5, 2008, 2:03 AM

Muneeb-

> --- On Thu, 12/4/08, Jeff Brower wrote:
> From: Jeff Brower
> Subject: Re: [c6x] HWI using dsp bios.
> To: "Muneeb Abid"
> Cc: c...
> Date: Thursday, December 4, 2008, 3:00 PM
>
> About IER bit...if i am not configering the bit of IER
> ..Bios will do that ?. i didnt get the idea . who is
> responsible to configure the IER bit? is that the
> programmer or the DSP bios?

DSP/BIOS.

> And i have checked the sechematic of the DSK . The pin on DSP is GP[7].

Then you need to select the correct interrupt number for GPIO7, right? Not
"INT4". In the 6455 data sheet, there is
mention of "Event Numbers", and of course, there is an event number
for GPIO7, so that's something you have to look
into. Your next task -- figure out correct HWI settings for GPIO7.

-Jeff
> Muneeb-
>
>> I have made a function to enable IER and GIE bit .  when
>> there is an intrupt IFR bit will be set to 1?.
>
> Ya.. but u call this function from main(), right? Since ur a newbie, I
> don't think it's a good idea to be messing
> with IER, IFR when DSP/BIOS has not finished initializing yet. If you
want to
> call user functions that play with
> interrupts, you should do it from a one-time or periodic task (set the
task up
> in DSP/BIOS). And be careful to
> restore any interrupt settings that you might temporarily change.
>
>> I am using the external intrupt pin 4 on Peripheral Expansion
>> Connector DSK6455. which is connected with FPGA. and i
>> am giving the interrupt signal  from FPGA and checking the
>> signal from logic analyzer. i have read that the INT4 pin
>> is active low and to give intrupt we have to keep pin at 0
>> for atleast 2 clk cycles and the interrupt is buffered at
>> rising edge. 
>
> Ok, you're giving an expansion connector signal and you don't seem
to
> know the actual DSP pin name. On 6455 it could
> be GPINT4, it could be something else... it makes a big difference when
> configuring HWI in DSP/BIOS. You need to go
> and look at the DSK 6455 schematic, figure that out and report back.
>
> -Jeff
>
>> --- On Thu, 12/4/08, Jeff Brower wrote:
>> From: Jeff Brower
>> Subject: Re: [c6x] HWI using dsp bios.
>> To: "Muneeb Abid"
>> Cc: c...
>> Date: Thursday, December 4, 2008, 1:45 PM
>>
>> Muneeb-
>>
>>> thank you for the detail reply.
>>
>>>> Yes i have removed the while loop from the main .But when i run
>>
>>> the programm the programm is not halting. is that normal?.
>>
>> Yes that's Ok. Your program should not halt unless you select
Debug |
> Halt on CCS menu. If you manually halt, then
>>
>> you can look at the source code that CCS shows when it stops and
verify
> that some type of DSP/BIOS code is running
>>
>> (i.e. not your code).
>>
>>> Yes i have given the intrrupt slection number to 4 . which means
>>
>>> he intrupt is connected to INT4?.
>>
>>>> GIE is enabled and i am also enablung the 4th bit of IER to ebale
the
>>
>>> INT4 .
>>
>> If you removed the loop from main(), then in which code do you set
IFR?
>>
>>> but still i am giving the intrupt to then ping INT4
>>
>> Exactly which pin is connected? Suggest you give the exact signal
name
> and pin number -- there may be some confusion.
>>
>> Also, how do you verify that you are pulsing the pin? Do you have a
dig
> scope connected? You have to be sure there
>>
>> really is a 3.3V active low pulse, exceeds minimum width, etc.
>>
>> -Jeff
>>
>>> ...nothing happens to IFR register and fucntion is not called.
>>
>>> but if i manually change the 4th bit of IFR
>>
>>> the function is called and it works fine..it seems that INT4
>>
>>> bit is not connected properly and not trigering the IFR
>>
>>> register.
>>
>>> Can you tell me what is wrong i am doing. and can you guide me
>>
>>> about the functionality of ECM.?
>>
>>>> thank you agains for all the help and replies.
>>
>>>> --- On Wed, 12/3/08, hkas2008-all@ yahoo.com. hk > yahoo.com. hk> wrote:
>>
>>> From: hkas2008-all@ yahoo.com. hk
hk>
>>
>>> Subject: Re: [c6x] HWI using dsp bios.
>>
>>> To: c6x@yahoogroups. com, muneeb_abid@ yahoo.com
>>
>>> Date: Wednesday, December 3, 2008, 6:01 PM
>>
>>>> Dear Muneeb,
>>
>>>> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may
be
> you can try the following to fix your issue.
>>
>>>> 1. Please remove the infinitive loop within the main. Since
DSP/BIOS
> will run after it exit the main function (run
>>> to
>>
>>> the end of the main function). So if add an infinitive loop within
the
> main DSP/BIOS will never run.
>>
>>>> 2. GIE will automatically enable when the program exit form main
to
> run the DSP/BIOS so enable GIE is not a must.
>>
>>>> 3. Please add your corresopnding event number into the field
> "DSP/BIOS->Scheduli ng->HWI-> HWI_INTx- >General
>>
>>> Tag->Interrupt selection number"
>>
>>>> Hope it can help you to fix your issue.
>>
>>>> Best Regards,
>>
>>> Albert Siu
>>
>>>> --- 2008年12月2日 星期二,muneeb abid > yahoo.com> 寫道﹕
>>
>>> 寄件人: muneeb abid
>>
>>> 主題: [c6x] HWI using dsp bios.
>>
>>> 收件人: c6x@yahoogroups. com
>>
>>> 日期: 2008 12 2 星期二 上午 4:53
>>
>>>>> Hello
>>
>>>> can anyone guide me about configuration of HWI using DSP bios...
>>
>>> I am putting the isr function in HWI object( in my case i am using
HWI
> 4) . and in main i am calling DSP bios
>>> function
>>
>>> HWI_disable and HWI_enable. and then while loop. and processor
wait
> for the intrupt.
>>
>>>> As i give the intrupt signal my ISR is not called and i dont see
any
> change in IER and IFR registers
>>
>>>> Thanks in advance for reply
>>
>>>> -Muneeb

Muneeb-

> The interrupt event for GIP7 is 58. In event manager i gave the
> function name to myIsr as well. And IER register is not enabled
> and not even IFR when i give the intrupt.

Why is IER not enabled? You have to debug that. Suggest to try this:

1) Verify your .tcf file (DSP/BIOS config file) has these lines:

bios.HWI.instance("HWI_INT7").useDispatcher = 1;
bios.HWI.instance("HWI_INT7").fxn = prog.extern("myIsr"); <-- ur func name
bios.HWI.instance("HWI_INT7").interruptSelectNumber = 58;

2) In main(), configure GPIO registers as follows:

-set GP[7] as an input in GPIO_DIR

-set BINTEN register to 1

-verify that bit corresponding to GP[7] is set
or clear in RIS_TRIG register, depending on
whether you want rising edge or falling edge.
Look in this doc:

http://focus.ti.com.cn/cn/lit/ug/sprug16/sprug16.pdf

(above doc is for C6474, not C6455, but shd b
similar -- I couldn't find the C6455 one)

3) In main(), call

C64_enableIER(C64_EINT7);

Note -- I think steps 2 and 3 are duplicate of what DSP/BIOS should do for you. But
maybe not, so you can make sure.

4) Set a breakpoint after call above, and verify IFR and IER values -- what do you
get?

Of course, none of this is going to work unless you really have a pulse at the GP[7]
pin on the DSP. You can probe that by following the schematic and layout file; find
a via or location to check that's *after* the expansion connector and as close to the
DSP as possible.

Also, don't put any type of print() or printf() statement in the ISR -- that never
works.

-Jeff

> There is nothing more about the hardware seting just that the interrupt should remain at 0 for more then 2 clock cycles and then get high.
>
> Should i use csl_intc to prgramm the intrupt. But i can not use dsp Bios with intc. I have heard it is easy to programm interrupt using DSP BIOS .
>
> --- On Fri, 12/5/08, Jeff Brower wrote:
> From: Jeff Brower
> Subject: Re: [c6x] HWI using dsp bios.
> To: "Muneeb Abid"
> Cc: c...
> Date: Friday, December 5, 2008, 2:03 AM
>
> Muneeb-
>
> > --- On Thu, 12/4/08, Jeff Brower wrote:
> > From: Jeff Brower
> > Subject: Re: [c6x] HWI using dsp bios.
> > To: "Muneeb Abid"
> > Cc: c...
> > Date: Thursday, December 4, 2008, 3:00 PM
> >
> > About IER bit...if i am not configering the bit of IER
> > ..Bios will do that ?. i didnt get the idea . who is
> > responsible to configure the IER bit? is that the
> > programmer or the DSP bios?
>
> DSP/BIOS.
>
> > And i have checked the sechematic of the DSK . The pin on DSP is GP[7].
>
> Then you need to select the correct interrupt number for GPIO7, right? Not
> "INT4". In the 6455 data sheet, there is
> mention of "Event Numbers", and of course, there is an event number
> for GPIO7, so that's something you have to look
> into. Your next task -- figure out correct HWI settings for GPIO7.
>
> -Jeff
>
> > Muneeb-
> >
> >> I have made a function to enable IER and GIE bit . when
> >> there is an intrupt IFR bit will be set to 1?.
> >
> > Ya.. but u call this function from main(), right? Since ur a newbie, I
> > don't think it's a good idea to be messing
> > with IER, IFR when DSP/BIOS has not finished initializing yet. If you
> want to
> > call user functions that play with
> > interrupts, you should do it from a one-time or periodic task (set the
> task up
> > in DSP/BIOS). And be careful to
> > restore any interrupt settings that you might temporarily change.
> >
> >> I am using the external intrupt pin 4 on Peripheral Expansion
> >> Connector DSK6455. which is connected with FPGA. and i
> >> am giving the interrupt signal from FPGA and checking the
> >> signal from logic analyzer. i have read that the INT4 pin
> >> is active low and to give intrupt we have to keep pin at 0
> >> for atleast 2 clk cycles and the interrupt is buffered at
> >> rising edge.br /> > >
> > Ok, you're giving an expansion connector signal and you don't seem
> to
> > know the actual DSP pin name. On 6455 it could
> > be GPINT4, it could be something else... it makes a big difference when
> > configuring HWI in DSP/BIOS. You need to go
> > and look at the DSK 6455 schematic, figure that out and report back.
> >
> > -Jeff
> >
> >> --- On Thu, 12/4/08, Jeff Brower wrote:
> >> From: Jeff Brower
> >> Subject: Re: [c6x] HWI using dsp bios.
> >> To: "Muneeb Abid"
> >> Cc: c...
> >> Date: Thursday, December 4, 2008, 1:45 PM
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> Muneeb-
> >>
> >>
> >>
> >>> thank you for the detail reply.
> >>
> >>>
> >>
> >>> Yes i have removed the while loop from the main .But when i run
> >>
> >>> the programm the programm is not halting. is that normal?.
> >>
> >>
> >>
> >> Yes that's Ok. Your program should not halt unless you select
> Debug |
> > Halt on CCS menu. If you manually halt, then
> >>
> >> you can look at the source code that CCS shows when it stops and
> verify
> > that some type of DSP/BIOS code is running
> >>
> >> (i.e. not your code).
> >>
> >>
> >>
> >>> Yes i have given the intrrupt slection number to 4 . which means
> >>
> >>> he intrupt is connected to INT4?.
> >>
> >>>
> >>
> >>> GIE is enabled and i am also enablung the 4th bit of IER to ebale
> the
> >>
> >>> INT4 .
> >>
> >>
> >>
> >> If you removed the loop from main(), then in which code do you set
> IFR?
> >>
> >>
> >>
> >>> but still i am giving the intrupt to then ping INT4
> >>
> >>
> >>
> >> Exactly which pin is connected? Suggest you give the exact signal
> name
> > and pin number -- there may be some confusion.
> >>
> >> Also, how do you verify that you are pulsing the pin? Do you have a
> dig
> > scope connected? You have to be sure there
> >>
> >> really is a 3.3V active low pulse, exceeds minimum width, etc.
> >>
> >>
> >>
> >> -Jeff
> >>
> >>
> >>
> >>> ...nothing happens to IFR register and fucntion is not called.
> >>
> >>> but if i manually change the 4th bit of IFR
> >>
> >>> the function is called and it works fine..it seems that INT4
> >>
> >>> bit is not connected properly and not trigering the IFR
> >>
> >>> register.
> >>
> >>> Can you tell me what is wrong i am doing. and can you guide me
> >>
> >>> about the functionality of ECM.?
> >>
> >>>
> >>
> >>> thank you agains for all the help and replies.
> >>
> >>>
> >>
> >>> --- On Wed, 12/3/08, hkas2008-all@ yahoo.com. hk > > yahoo.com. hk> wrote:
> >>
> >>> From: hkas2008-all@ yahoo.com. hk > hk>
> >>
> >>> Subject: Re: [c6x] HWI using dsp bios.
> >>
> >>> To: c6x@yahoogroups. com, muneeb_abid@ yahoo.com
> >>
> >>> Date: Wednesday, December 3, 2008, 6:01 PM
> >>
> >>>
> >>
> >>> Dear Muneeb,
> >>
> >>>
> >>
> >>> I am using the DSK6455 with EMAC interrupt using DSP/BIOS. So may
> be
> > you can try the following to fix your issue.
> >>
> >>>
> >>
> >>> 1. Please remove the infinitive loop within the main. Since
> DSP/BIOS
> > will run after it exit the main function (run
> >>> to
> >>
> >>> the end of the main function). So if add an infinitive loop within
> the
> > main DSP/BIOS will never run.
> >>
> >>>
> >>
> >>> 2. GIE will automatically enable when the program exit form main
> to
> > run the DSP/BIOS so enable GIE is not a must.
> >>
> >>>
> >>
> >>> 3. Please add your corresopnding event number into the field
> > "DSP/BIOS->Scheduli ng->HWI-> HWI_INTx- >General
> >>
> >>> Tag->Interrupt selection number"
> >>
> >>>
> >>
> >>> Hope it can help you to fix your issue.
> >>
> >>>
> >>
> >>> Best Regards,
> >>
> >>> Albert Siu
> >>
> >>>
> >>
> >>> --- 2008年12月2日 星期二,muneeb abid > > yahoo.com> 寫道﹕
> >>
> >>> 寄件人: muneeb abid
> >>
> >>> 主題: [c6x] HWI using dsp bios.
> >>
> >>> 收件人: c6x@yahoogroups. com
> >>
> >>> 日期: 2008 12 2 星期二 上午 4:53
> >>
> >>>
> >>
> >>>
> >>
> >>> Hello
> >>
> >>>
> >>
> >>> can anyone guide me about configuration of HWI using DSP bios...
> >>
> >>> I am putting the isr function in HWI object( in my case i am using
> HWI
> > 4) . and in main i am calling DSP bios
> >>> function
> >>
> >>> HWI_disable and HWI_enable. and then while loop. and processor
> wait
> > for the intrupt.
> >>
> >>>
> >>
> >>> As i give the intrupt signal my ISR is not called and i dont see
> any
> > change in IER and IFR registers
> >>
> >>>
> >>
> >>> Thanks in advance for reply
> >>
> >>>
> >>
> >>> -Muneeb