Why controller is going in Service mode?

Yes! And we have a detailed description of how to use the IecCheck and AdvIecChk libraries in this post.