AnsweredAssumed Answered

IMX1050RT Encoder Interrupt Posmatch mode has no effect

Question asked by BENJAMIN OLAYINKA on Jul 3, 2019
Latest reply on Jul 16, 2019 by Kerry Zhou

I'm trying to trigger an interrupt any time an encoder position changes, and it looks like the 

enc_config_t.positionMatchMode =

kENC_POSMATCHOnReadingAnyPositionCounter inititialization setting should cause the interrupt to trigger, but it does nothing. I confirmed in ENC_Init that setting positionMatchMode sets the 

ENC_CTRL2_OUTCTL_MASK, but it doesn't change the behaviour, I only get an interrupt when the position is equal to position compare.

 

Is this a hardware bug? Can someone with this board check?

 

/* Initialize the ENC module. */
     enc_config_t mEncConfigStruct;
     ENC_GetDefaultConfig(&mEncConfigStruct);
     mEncConfigStruct.positionMatchMode = kENC_POSMATCHOnReadingAnyPositionCounter;
     ENC_Init(ENC1, &mEncConfigStruct);
     ENC_DoSoftwareLoadInitialPositionValue(ENC1); /* Update the position counter with initial value. */
     NVIC_SetPriority(ENC1_IRQn, MAX_INTERRUPT_PRIORITY);
     EnableIRQ(ENC1_IRQn);
     ENC_EnableInterrupts(ENC1, kENC_PositionCompareInerruptEnable);c

Outcomes