Hello,
I try to use PITn (periodic interrupt timer) for one of my application. I work with k60 kinetis with IAR IDE.
I program rthe PIT0 to generate a interrupt every N secondes but when I try to do the same think with the PIT1 I get an error.
As soon as I try to modify one of the register of PIT1 (PIT_LDVAL1 for example) the CPU generate an interrupt (vector 3 :Hard Fault).
I don't really understand the reason of that error... :smileyshocked:
Can someone explain me the reason of this? Or give me some advice about it?
Best regard.
Solved! Go to Solution.
Hi Xavier
A hard fault usually means that the clock to the module has not been enabled.
All PITs share the same control in SIM_SCGC6 but may be it was disabled when PIT0 finished using it and needs to be re-enabled in order to use PIT1 (?)
Regards
Mark
Hi Xavier
A hard fault usually means that the clock to the module has not been enabled.
All PITs share the same control in SIM_SCGC6 but may be it was disabled when PIT0 finished using it and needs to be re-enabled in order to use PIT1 (?)
Regards
Mark
Thank you the response, it works properly now.