Timer interrupt TVAL0 and TCTRL0 in s32k144 with iar plugin

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

Timer interrupt TVAL0 and TCTRL0 in s32k144 with iar plugin

1,327 Views
lohrsistemas
Contributor IV

Hi, if I try to use the timer overflow in s32 studio for ARM with IAR plugin, two errors occour when I configure the timer. Error[Pe136]: struct "<unnamed>" has no field "TVAL0".

Error[Pe136]: struct "<unnamed>" has no field "TCTRL0".

See attachement.

 

Any ideia what's happening? 

 

Thanks.

Labels (1)
2 Replies

860 Views
gokulavarma_gan
Contributor II

Hello lohr,

Inorder to init the LPIT timer which clock should i need to initialize.

Because whenever i try to set LPIT0->MCR register my program counter got incremented till the end and provides reset.

I cant able to set this register(MCR).

0 Kudos

860 Views
lohrsistemas
Contributor IV

I think I found the solution to the problem. I had to declare:

  LPIT0->TMR[0].TVAL = 80000000;    /* Chan 0 Timeout period: 80M clocks */
  LPIT0->TMR[0].TCTRL0 = 0x00000001; /* T_EN=1: Timer channel is enabled */