From: Rubén on
I need the same. I need to schedule de timer interrupts in the f28335.
Is this posible?

Thanks

Ruben Galvez
"Pawel " <blaszczy(a)student.agh.edu.pl> wrote in message <hafj9e$3jj$1(a)fred.mathworks.com>...
> Hello!
> I would like to use in my application Timer1 with configurable parameters (timer period etc). However - I can't find any block which works with timer and interrupts from it. Hardware Interrupt doesen't work with timer and I don't know when I can configure it. In C2831x DSP Chip support we have Timer block and Hardware Interrupt co-operate with timer - can I find similar block for F28335 chip? Is it avaiable in Matlab R2008b?
>
> Best Regards,
> Pawel Blaszczyk
From: Philip Chu on

F28335 does not have a timer block to work with HWI block.

As to user Timer 1, CPU-timer1 is enabled together with XINT13. Though there
is nowhere to use it through our HW interrupt block, user may try using
Timer 1 interrupt
by changing the generated code as below:



Put following lines into the main():

======================================================
// E.g., configure the timer 1 the period to be 1 second
ConfigCpuTimer(&CpuTimer1, 150, 1000000);


// Reset interrupt counters:
CpuTimer1.InterruptCount = 0;

EALLOW; // This is needed to write to EALLOW protected registers

PieVectTable.XINT13 = &cpu_timer1_isr;

EDIS; // This is needed to disable write to EALLOW protected registers

IER |= M_INT13;

==========================================================



And also define its own ISR cpu_timer1_isr below. And, extern Interrupt 13
cannot be used for other purpose at the same moment

interrupt void cpu_timer1_isr(void);


You may follow the source file: example_2833xCPUTimer.c provided by TI to
change these lines accordingly and see if the Timer1 works.


Thanks,

Philip

"Rubén " <rubenga88(a)gmail.com> wrote in message
news:huqn2d$efc$1(a)fred.mathworks.com...
>I need the same. I need to schedule de timer interrupts in the f28335.
> Is this posible?
>
> Thanks
>
> Ruben Galvez
> "Pawel " <blaszczy(a)student.agh.edu.pl> wrote in message
> <hafj9e$3jj$1(a)fred.mathworks.com>...
>> Hello!
>> I would like to use in my application Timer1 with configurable parameters
>> (timer period etc). However - I can't find any block which works with
>> timer and interrupts from it. Hardware Interrupt doesen't work with timer
>> and I don't know when I can configure it. In C2831x DSP Chip support we
>> have Timer block and Hardware Interrupt co-operate with timer - can I
>> find similar block for F28335 chip? Is it avaiable in Matlab R2008b?
>>
>> Best Regards,
>> Pawel Blaszczyk
>


From: Philip Chu on
Add the missing line of StartCpuTimer1();

It should be as below:


======================================================
// E.g., configure the timer 1 the period to be 1 second
ConfigCpuTimer(&CpuTimer1, 150, 1000000);


// Start the timer

StartCpuTimer1();

// Reset interrupt counters:
CpuTimer1.InterruptCount = 0;

EALLOW; // This is needed to write to EALLOW protected registers

PieVectTable.XINT13 = &cpu_timer1_isr;

EDIS; // This is needed to disable write to EALLOW protected registers

IER |= M_INT13;

> ==========================================================


"Philip Chu" <pchu(a)mathworks.com> wrote in message
news:huu50b$afi$1(a)fred.mathworks.com...
>
> F28335 does not have a timer block to work with HWI block.
>
> As to user Timer 1, CPU-timer1 is enabled together with XINT13. Though
> there
> is nowhere to use it through our HW interrupt block, user may try using
> Timer 1 interrupt
> by changing the generated code as below:
>
>
>
> Put following lines into the main():
>
> ======================================================
> // E.g., configure the timer 1 the period to be 1 second
> ConfigCpuTimer(&CpuTimer1, 150, 1000000);
>
>
> // Reset interrupt counters:
> CpuTimer1.InterruptCount = 0;
>
> EALLOW; // This is needed to write to EALLOW protected registers
>
> PieVectTable.XINT13 = &cpu_timer1_isr;
>
> EDIS; // This is needed to disable write to EALLOW protected registers
>
> IER |= M_INT13;
>
> ==========================================================
>
>
>
> And also define its own ISR cpu_timer1_isr below. And, extern Interrupt 13
> cannot be used for other purpose at the same moment
>
> interrupt void cpu_timer1_isr(void);
>
>
> You may follow the source file: example_2833xCPUTimer.c provided by TI to
> change these lines accordingly and see if the Timer1 works.
>
>
> Thanks,
>
> Philip
>
> "Rubén " <rubenga88(a)gmail.com> wrote in message
> news:huqn2d$efc$1(a)fred.mathworks.com...
>>I need the same. I need to schedule de timer interrupts in the f28335.
>> Is this posible?
>>
>> Thanks
>>
>> Ruben Galvez
>> "Pawel " <blaszczy(a)student.agh.edu.pl> wrote in message
>> <hafj9e$3jj$1(a)fred.mathworks.com>...
>>> Hello!
>>> I would like to use in my application Timer1 with configurable
>>> parameters (timer period etc). However - I can't find any block which
>>> works with timer and interrupts from it. Hardware Interrupt doesen't
>>> work with timer and I don't know when I can configure it. In C2831x DSP
>>> Chip support we have Timer block and Hardware Interrupt co-operate with
>>> timer - can I find similar block for F28335 chip? Is it avaiable in
>>> Matlab R2008b?
>>>
>>> Best Regards,
>>> Pawel Blaszczyk
>>
>
>