__interrupt void USSLIB_HAL_TIMER_RXEN_INT(void)
{
switch(__even_in_range(HARDWAREWREG16(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS + OFS_TAxIV),
TAIV__TAIFG))
{
case TAIV__NONE: break; // No interrupt
case TAIV__TACCR1: // CCR1, Enables RXEN
// Enable RxEN, RxEN will be turned Off after USS acquisition
USSSWLIB_HAL_AFE_RXEN_PORT |= (USSSWLIB_HAL_AFE_RXEN_PIN);
// Disable Timer
HARDWAREWREG16(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS + OFS_TAxCTL) &= ~(MC_3 | TAIFG);
break;
case TAIV__TACCR2: // CCR2, start ASQ, restart timer to trigger RxEN
// Wait until USS module is in READY state
while((UUPSCTL & UPSTATE_3) != UPSTATE_3);