Is it possible to use a comparator with STM32CubeMX and STM32 Mat-target?
Hello everyone,
I'd like to use a NUCLEO-G474RE to control a buck converter in current mode. To do that I work with STM32CubeMX and Simulink, and I need to use a comparator. My problem is that whatever the input configuration I choose on CubeMX and the voltage I apply on the pins the output is always zero.
After searching into mthe generated code I discovered that the function HAL_COMP_Init is called but HAL_COMP_Start isn't . This is understandable because there aren't any COMP block in my Simulink model but the problem is that these blocks don't exist. So is it possible to generate the full functionning code to drive the comparator with this workflow?
I know I could probably add a few lines in the already generated code, but I would like to share my work only through the Simulink and CubeMX files without any need for the users to code by themselves.