Hello,
Its hard to say, here is the general code (bare metal), but it always depends on the HW you are using.
void SIUL_init(void)
{
SIU.PCR[4].R = 0x0400; // pin for output eTimer1_CH[0] enable A[4]
}//SIUL_init
void eTimer_init(void)
{
//Initialize eTimer1_ch0 to generate pwm output signal
ETIMER_1.CHANNEL[0].CNTR.R = 0x0000; // Initial value
ETIMER_1.CHANNEL[0].CTRL.B.CNTMODE = 0x1; // Counter mode = count rising edges
ETIMER_1.CHANNEL[0].CTRL.B.PRIsrc=0x18; // Primary count source = IBBus clock devide by prescaler 1
ETIMER_1.CHANNEL[0].CTRL2.B.OEN = 0x1; // Output enable
ETIMER_1.CHANNEL[0].CTRL.B.LENGTH = 0x1; // Reload conter after reaching count value
ETIMER_1.CHANNEL[0].LOAD.R = 0x1; // Reload value used to initialize the counter
ETIMER_1.CHANNEL[0].COMP1.R = 0x00; // Compare value for counter
ETIMER_1.CHANNEL[0].COMP2.R = 0x0; // Compare value for counter
ETIMER_1.CHANNEL[0].CTRL2.B.OUTMODE = 0x3; // Toggle OFLAG output on successful compare (COMP1 or COMP2)
ETIMER_1.CHANNEL[0].CMPLD1.R = 0x0;
ETIMER_1.CHANNEL[0].CMPLD2.R = 0x0;
ETIMER_1.CHANNEL[0].CCCTRL.R = 0x8800;
//Enable intrrupt on compare 1 match
ETIMER_1.CHANNEL[0].INTDMA.B.TCF1IE = 0x1; // Timer compare 1 flag interrupt enable
}//eTimer_init