eTimer Interrupt vector assignment for port pins

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eTimer Interrupt vector assignment for port pins

Jump to solution
1,251 Views
peacethanima27
Contributor II

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 */

Labels (1)
0 Kudos
Reply
1 Solution
1,181 Views
peacethanima27
Contributor II

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;

View solution in original post

0 Kudos
Reply
2 Replies
1,181 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

great you find this typo...

BR, Petr

0 Kudos
Reply
1,182 Views
peacethanima27
Contributor II

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;

0 Kudos
Reply