For some reason, the interrupt vector table assignment for the port pins are inverted.
A signal transition at A0 runs the ETimer0_Ch2_ISR() and for A2, runs ETimer0_Ch0_ISR().
Can anyone help please?
// Configure the eTimer channel pins for detecting the Hall sensor transitions.
// PA0, PA1 and PA2
SIUL2.MSCR[0].B.IBE = 1; /* PA0: Enable pad for input - eTimer0 ch0 */
SIUL2.IMCR[59].B.SSS = 2; /* eTimer0 ch0: connected to pad PA0 */
SIUL2.MSCR[1].B.IBE = 1; /* PA1: Enable pad for input - eTimer0 ch1 */
SIUL2.IMCR[60].B.SSS = 2; /* eTimer0 ch1: connected to pad PA1 */
SIUL2.MSCR[2].B.IBE = 1; /* PA2: Enable pad for input - eTimer0 ch2 */
SIUL2.IMCR[61].B.SSS = 2; /* eTimer0 ch2: connected to pad PA2 */
Vectors:
(uint32_t) &ETimer0_Ch0_ISR, /* Vector # 611 TC0IR eTimer_0 */
(uint32_t) &ETimer0_Ch1_ISR, /* Vector # 612 TC1IR eTimer_0 */
(uint32_t) &ETimer0_Ch2_ISR, /* Vector # 613 TC2IR eTimer_0 */
Solved! Go to Solution.
Hi
I just fixed this issue. It was an overlook error as below.
ETIMER_0.CH[0].CTRL1.R = 0x3F00;
ETIMER_0.CH[1].CTRL1.R = 0x3F01;
ETIMER_0.CH[0].CTRL1.R = 0x3F02;
Changing it as below solved the issue,
ETIMER_0.CH[0].CTRL1.R = 0x3F00;
ETIMER_0.CH[1].CTRL1.R = 0x3F01;
ETIMER_0.CH[2].CTRL1.R = 0x3F02;
Hi,
great you find this typo...
BR, Petr
Hi
I just fixed this issue. It was an overlook error as below.
ETIMER_0.CH[0].CTRL1.R = 0x3F00;
ETIMER_0.CH[1].CTRL1.R = 0x3F01;
ETIMER_0.CH[0].CTRL1.R = 0x3F02;
Changing it as below solved the issue,
ETIMER_0.CH[0].CTRL1.R = 0x3F00;
ETIMER_0.CH[1].CTRL1.R = 0x3F01;
ETIMER_0.CH[2].CTRL1.R = 0x3F02;