I tried to emulate ENSM level mode through GPIO using shell script. The functionality of the code is described below:
Step 1: TXNRX =1 enable = 0 -> in alert state
Step 2: TXNRX =1 enable = 1 -> moved to TX state with LO frequency of 300MHz
Step 3: TXNRX =1 enable = 1 -> while the state machine was still in Tx mode, the Tx LO is hopped to 470MHz
Step 4: TXNRX =1 enable = 0 -> I expect the state should move back to Alert state
But the problem is that the ENSM moved to SLEEP state instead of ALERT. I'm facing this problem only when calib_mode is in auto and the frequency is hopped more than 100MHz.
So to cross check, with the help of direct_reg_access, I access the 0x14 reg. and it is in the value 0x19 at Step 1 but it changed to 0x38 at Step 4(indicating TO_ALERT bit is cleared. Hence, moving back to sleep state instead of alert state)
I'm facing this situation only when both calib_mode is in auto and frequency hop more than 100MHz. If any one of this is not satisfied, this problem won't arise.
why is the TO_ALERT bit automatically changed when frequency is hopped more than 100MHz and calib_mode is in auto?
If I'm using fast lock profiles instead of writing the LO frequency, then I don't face this issue.