Hi Irmantas Budrys,
Actually, the calculation is very simple.
You also can refer to the KEA128 reference manual, chapter 28.5 Initialization and application information.
If your bus clock is 24Mhz, then you want to get 1ms, the pit clock is the bus clock, so:
PIT_LDVALn = 1ms /bus clock =24000= 0x5dc0.
Wish it helps you!
If you still have problem, please contact me!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------