PIT(Periodic Interrupt Timer) can't work properly on TWR-K20D72M

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

PIT(Periodic Interrupt Timer) can't work properly on TWR-K20D72M

1,194 Views
bhavinmaru
Contributor III

Hello,

i am working with TWR-K20D72M EVM as controller and IAREW software for programming.i am working on PIT(Periodic Interrupt Timer) module but facing some problems.i attached code for your reference.this code works and timer also works but i am facing some problems.below i mention my problem please try to solve my below query:

 

-- in this code i load the value 90000000 in PIT_LDVAL0 register,so when timer decrements to 0 at that time in PIT_TFLG0 register TIF(Timer Interrupt Flag) flag is set but isr function(pit_isr()) not executed.and when timer reaches to 0 then it continuously prints the string "****default_isr entered on vector 84*****".

please help me so that i can execute isr function(pit_isr()).

Any help in this will be appreciated more.


Thank You
Bhavin

Original Attachment has been moved to: pit_timer.zip

Labels (1)
3 Replies

935 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Bhavin,

Please use VECTOR_084 in your isr.h.  VECTOR_84 is not listed in vectors.h.

VECTOR_084.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

935 Views
bhavinmaru
Contributor III

Hi Robin_Shen,

Thank You very much for your appreciated reply as per your suggestion after changing VECTOR_084 in vectors.h isr function is now execute.

0 Kudos
Reply

935 Views
mjbcswitzerland
Specialist V


Hi

Interrupt vector 84 is used by the PIT0 interrupt. It sounds as though you haven't entered the handler into the interrupt vector table and the error that you are getting is due to the default handler (undefined interrupt) being called instead.

Regards

Mark

Full resources for TWR-K20D72: http://www.utasker.com/kinetis/TWR-K20D72M.html
Kinetis for professionals: http://http://www.utasker.com/kinetis.html

0 Kudos
Reply