/* general configuration to ETM to enable hardware synchronization.  */
void ETM_HardwareSync(ETM_Type *pETM, uint8_t u8TriggerN)
/* general configuration to ETM to enable hardware synchronization.  */
void ETM_HardwareSync(ETM_Type *pETM, uint8_t u8TriggerN)
{
    ASSERT(ETM2 == pETM);
    pETM->SYNCONF   |= ETM_SYNCONF_SYNCMODE_MASK;
    switch(u8TriggerN)
    {
        case ETM_SYNC_TRIGGER_TRIGGER2: 
                pETM->SYNC |= ETM_SYNC_TRIG2_MASK;
                break;  
        case ETM_SYNC_TRIGGER_TRIGGER1: 
                pETM->SYNC |= ETM_SYNC_TRIG1_MASK;
                break;
        case ETM_SYNC_TRIGGER_TRIGGER0:
                pETM->SYNC |= ETM_SYNC_TRIG0_MASK; 
                break;
        default: 
                break;
    }
}