Is there any hal to configure this 2-mode configuration!
Yes. This post has a configuration using a step/dir spindle drive to manage spindle, orient, and c-axis modes:
github.com/LinuxCNC/linuxcnc/issues/3556
A few posts down the author attached a configuration zip file.
It's not extremely complicated, but neither is it simple.
And the issue reported in the post is still present. I'm almost done with my attempt at a configuration based on the posted one, and I'll be testing if the joint.N.index-enable signal is what causes motion errors.