How do I configure a timer using Processor expert

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I configure a timer using Processor expert

2,628 Views
juliancox
Contributor V

I have added the timer interrupt TI1:TimerInt, but all of the timer setup functions are greyed out. All I have available are Enable, Disable, EnableEvent and DisableEvent. How do I configure the timer using Processor Expert?

0 Kudos
5 Replies

1,797 Views
BlackNight
NXP Employee
NXP Employee

Hi Julian,

you have to specify the timer peripheral and the period in the properties, e.g.

pastedImage_1.png

For TimerUnit_LDD for example see Tutorial: Timer (LED) with Processor Expert for Kinetis | MCU on Eclipse 

I hope this helps,

Erich

0 Kudos

1,797 Views
juliancox
Contributor V

Thanks for the help, if it was that simple... FYI I am using C/W 10.7 with a S08SH8. In Components I have TI1:TimerInt loaded from Processor Expert, where there is NOTHING like Timer Unit_LDD. In the Components Library/Properties mine is essentially the same as yours, except Periodic interrupt Source is MTIMmod and Counter is MTIM. Interrupt S Period is Unassigned and when I click on it it refers to the Timing Dialogue Box. - plenty of information about it, but nothing about how to access it. All I want is a periodic interrupt; surely it can't be all that difficult???? BTW in processor expert there are no components with names ending in _LDD. To use a metaphor - The C/W published information explains in great detail the theory of the internal combustion engine, but not how to drive the car. 

0 Kudos

1,797 Views
BlackNight
NXP Employee
NXP Employee

Hi Julian,

As you did not specify which device you are using, I (wrongly) assumed you are using an ARM Cortex :-(.

For the S08 (using S08QE128 below) it is basically on the top level the same: specify the timer/interrupt source and period:

pastedImage_1.png

This then will call the TI1_OnInterrupt() event for every timer interrupt:

pastedImage_2.png

The function/hook is generated into Events.c:

pastedImage_3.png

I hope this helps,

Erich

1,324 Views
SBK_SBK_SBK_SBK
Contributor I

hwo this will work in main().

please give me an example to generate delay to toggle LED

 

0 Kudos

1,797 Views
juliancox
Contributor V

Thanks for your help. The last time I used this architecture was with the Motorola MEKD1 and MEKD2 kits in the '70s.

I am now able to compile without errors and so I can continue on my rather steep re-learning curve.

0 Kudos