Showing results for 
Search instead for 
Did you mean: 

How can I allocate port D2 as the Encoder Z pulse input?

Associate III

The "documentation" suggests that any IO port that can act as an interrupt is usable, but the motor control workbench only has selections for A2, A9 and B10, all of which are used for other peripherals. The document suggests selecting a "dummy" port and then manually editing the .IOC file afterwards (!?!) but none of the available ports are listed.


Any GPIO pin can become an external interrupt.

Make D2 a GPIO_EXTI2 in the MX program. That makes it part of the EXTI interrupt.

Read up on the EXTI interrupts in the user manual for your chip.

cedric H
ST Employee

Hello @jartim​ 

I guess you are using WB 6.

From this version, the proposed pins are only the one matching the description of the boards used in your project.

If you design your own inverter, power or control board, the easiest way is to describe it as we did for all the boards we support.

We just release a new version SDK 6.1 with a lot of new supported boards.