Forums

C6211 Interrupts McBSP & Timer1

Started by Unknown March 15, 2001
Hi

I'm in the process of updating my code to use interrupts rather than
polling and waiting.

I need to used Ext_Int4 for the McBSP Hardware interrupt and also
Timer1, to send a signal every 6000 bit clock cycles.

My code looks something like this:

#include <c6x.h>
#include <c6211dsk.h>
#include "c6211interrupts.h"

void set_interrupts(void)
{
config_Interrupt_Selector(2, TINT1);
config_Interrupt_Selector(4, EXT_INT4);
enableSpecificINT(2);
enableSpecificINT(4);
enableNMI();
enableGlobalINT();
}

I want EXT_INT4 to call a function called poll_int when interrupted,
and for TINT1 to call a function call calib_node, when timer1
interrupts.

I'm not sure what .asm or .cmd files I need, I have looked at
SPHA001, SPRU190D, SPRU189D, and several examples, I have no
experience with asmmebly, so I'm looking for a solution with as
little asmmebly as possible.

Is there something to sent in the the Compiler/Assemby/Linker options?

Thanks

Garfay



Hello Garfay,
check some projects (C source files and DSP/BIOS configuration) in
%TI_DIR%\c6000\ssl\examples
E.g.:
%TI_DIR%\c6000\ssl\examples\6201evm\stress
%TI_DIR%\c6000\ssl\examples\6211dsk\timer2

Bye,
Gabor

> I'm in the process of updating my code to use interrupts rather than
> polling and waiting.
>
> I need to used Ext_Int4 for the McBSP Hardware interrupt and also
> Timer1, to send a signal every 6000 bit clock cycles.
>
> My code looks something like this:
>
> #include <c6x.h>
> #include <c6211dsk.h>
> #include "c6211interrupts.h"
>
> void set_interrupts(void)
> {
> config_Interrupt_Selector(2, TINT1);
> config_Interrupt_Selector(4, EXT_INT4);
> enableSpecificINT(2);
> enableSpecificINT(4);
> enableNMI();
> enableGlobalINT();
> }
>
> I want EXT_INT4 to call a function called poll_int when interrupted,
> and for TINT1 to call a function call calib_node, when timer1
> interrupts.
>
> I'm not sure what .asm or .cmd files I need, I have looked at
> SPHA001, SPRU190D, SPRU189D, and several examples, I have no
> experience with asmmebly, so I'm looking for a solution with as
> little asmmebly as possible.
>
> Is there something to sent in the the Compiler/Assemby/Linker options?
>
> Thanks
>
> Garfay





Hey,we don't have the ssl subdirectory in the ccs. is this because
the ccs we have is for c6211 dsk? i'm using ccs vercion 1.05. by the
way, does sthis version of ccs supports the dsp/biosII?

thanks,
jane
--- In code-comp@y..., KRUCHIO Gabor - VD3 <gabor.kruchio@a...> wrote:
> Hello Garfay,
> check some projects (C source files and DSP/BIOS configuration) in
> %TI_DIR%\c6000\ssl\examples
> E.g.:
> %TI_DIR%\c6000\ssl\examples\6201evm\stress
> %TI_DIR%\c6000\ssl\examples\6211dsk\timer2
>
> Bye,
> Gabor
>
> > I'm in the process of updating my code to use interrupts rather
than
> > polling and waiting.
> >
> > I need to used Ext_Int4 for the McBSP Hardware interrupt and also
> > Timer1, to send a signal every 6000 bit clock cycles.
> >
> > My code looks something like this:
> >
> > #include <c6x.h>
> > #include <c6211dsk.h>
> > #include "c6211interrupts.h"
> >
> > void set_interrupts(void)
> > {
> > config_Interrupt_Selector(2, TINT1);
> > config_Interrupt_Selector(4, EXT_INT4);
> > enableSpecificINT(2);
> > enableSpecificINT(4);
> > enableNMI();
> > enableGlobalINT();
> > }
> >
> > I want EXT_INT4 to call a function called poll_int when
interrupted,
> > and for TINT1 to call a function call calib_node, when timer1
> > interrupts.
> >
> > I'm not sure what .asm or .cmd files I need, I have looked at
> > SPHA001, SPRU190D, SPRU189D, and several examples, I have no
> > experience with asmmebly, so I'm looking for a solution with as
> > little asmmebly as possible.
> >
> > Is there something to sent in the the Compiler/Assemby/Linker
options?
> >
> > Thanks
> >
> > Garfay