Configure encoder controller to generate interrupts on phase_a and phase_b on i.MX RT1064 mcu

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Configure encoder controller to generate interrupts on phase_a and phase_b on i.MX RT1064 mcu

1,896件の閲覧回数
thomas82
Contributor I

Hi,

I am working with a i.MX RT1064 mcu connected to a encoder.

I have configured the ENC controller of the mcu with default configuration using the config tool and it works succesfully, I detect the movement of the motor connected because I saw the counting of the pulse in debug.

Now, I would want to configure the ENC controller to generate interrupts on the edges of the phase_A and phase_B signals.

My encoder has only these two pins, is possible to do this without the pin trigger, home, index, posmatch ?

Thanks in advance,
Tommaso

0 件の賞賛
返信
2 返答(返信)

1,867件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

The edges of the PHASEA and PHASEB signals cannot be programmed to interrupt the processor. The only available interrupts for that module are found in Table 56-2. Interrupt Summary of the reference manual IMXRT1064RM.

nxf86756_0-1674083974256.pngnxf86756_0-1674083974256.png

Hope it helps you. Please let me know if you have more questions about it.

Have a nice day!

0 件の賞賛
返信

1,854件の閲覧回数
thomas82
Contributor I

Hi,

thanks for your support.

I have used the position compare interrupt and I resolved.

The problem now is that after the reachment of the position, even if in the ENC1_IRQHANDLER I call the ENC_ClearStatusFlags function, arrive continuosly interrupts (with motor and encoder stopped).

I also have tried to set to 1 the CMPIRQ bit in the CTRL register with the instruction:

ENC1.EncoderId->CTRL = ENC1.EncoderId->CTRL | 0x2;

as reported in the reference manual but I don't resolve it.

Kindly could you help me ?

Thanks

0 件の賞賛
返信