cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.15 input capture from comparator output

frackers
Senior
Posted on June 02, 2016 at 01:29

Running stm32cubemx 4.15 and STM32Cube_FW_F3_V1.5.0 HAL

I can set the output of a comparator to a timer input capture (e.g. comp1 output to timer 1 input capture 1) but I can't then set up the timer input capture without selecting an input pin (which I don't have free so I have a conflict anyway). 

Is the HAL capable of handling this scenario even if CubeMX doesn't provide the choices and how do I prevent any project updates from overwriting any changes I might make to the timer setup.

4 REPLIES 4
Walid FTITI_O
Senior II
Posted on June 02, 2016 at 11:17

Hi frackers,

STM32CubeMx forced the configuration of TIM input pin which not recommended with the needed interconnection between COMP and TIM. It is a known bug and I report it internally to our CubeMx team.

For your question :

The C code generated by STM32CubeMX provides user sections as illustrated below. They allow user C code to be inserted and preserved at next C code generation. User sections shall neither be moved nor renamed. Only the user sections defined by STM32CubeMX are preserved. If user created sections, they will be ignored and lost at next C code generation.

 /* USER CODE BEGIN 0 */

 (..)

 /* USER CODE END 0 */

Thus, You should replace the functions and the related variables, declarations to the user generated sections to be preserved in the next generation.

-Hannibal-

stm32cube-t
Senior III
Posted on July 19, 2016 at 10:12

Dear user,

This issue has been fixed in our latest version 4.16.

Best regards

Mechatronz
Associate II

Dear @stm32cube-t​ ,

The problem is not yet fixed I guess. I am using version 4.24 and tried the same thing, but the CubeMx is not allowing me. I had to comment out the GPIO init for the respective timer Input capture channel. Please have a look into that.

Best Regards

Amel NASRI
ST Employee

Hello,

Current CubeMX version is 4.26.1.

Do you confirm that issue isn't yet fixed with this version?

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.