Hi Santhosh Ramani,
Please read this in the reference manual at first:

So, if you want to get the precise clk, I don't recommend you to use ICR=0X00-0X0F.
Please choose ICR>0X10, you can use higher core clock, then use larger ICR to get 400Khz.
Please try again on your side with my recommendation.
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------