cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] STM32G4 Use remap with encoder inputs

Andrea Canepa
Senior

STM32CubeIDE v.1.3.0

STM32G431RBTx

In any timer if the input channels 1 and 2 are set for use as "Combined channels = Encoder Mode" (by CubeMX or integrated in CubeIDE), it is not possible to select a remapped input (for example from the comparator). This makes it mandatory to use a useless input pin, to then command the remap in the software through HAL or LL libraries. Please fix up.

Regards

Andrea

4 REPLIES 4

Hello Andrea Canepa ,

I didn't reproduce the issue, could you please explain more your problem ?

You can share your ioc file in order to check the issue.

Thanks,

Khouloud.

Hello Khouloud,

to reproduce the problem is simple:

  1. Create a project for STM32G431RBTx
  2. In STM32CubeIDE open your .ioc file with "Device Configuration Tool".
  3. Select a "General-purpose timers", for example TIM3; in the "MODE" window look for the Combined Channels row and select "Encoder mode + index".
  4. Automatically the two lines "Channel 1" and "Channel 2" will become light gray (ie not editable):

0693W000000UpZqQAK.jpg

Two I/O pins will be engaged and there is no way not to use them, because there is no possibility to change the inputs of TI1 and TI2 using the remaps (using signal from the comparators).

This is just a setup problem with CubeMX (or Device Configuration Tool), because if I use the LL or HAL libraries, I can remap the TI1 and TI2 inputs to the comparators and not use two pins unnecessarily. See register TIMx_TISEL.

Regards

Andrea

Hello Andrea Canepa 

Thanks for your reported issue. This is raised internally for correction. We will come back to you with answer.

Kind Regards,

Khouloud.

Hello Khouloud,

I would also like to clarify that this bug had already been reported by me on 22 July 2019 to your Online support service (see Case Number 00084660) but it has probably been forgotten.

Regards

Andrea