cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G051 - Current Control, Cycle by Cycle

Marc38
Associate II

Hello,

I am new with STM32. We would like to do a current control exactly like on this document :

https://www.st.com/resource/en/product_training/STM32G0-Analog-Comparators-COMP.pdf

page 13

Marc38_0-1744274148620.png

But we would like to use COMP1 for ZCD and COMP2 for overcurrent.

However, it is not clear if it is possible and how to configure the MCU.

Marc38_3-1744276720125.png

Anyone can help ?

Best regards,

Marc

6 REPLIES 6
Andrew Neil
Super User

@Marc38 wrote:

I'm new with STM32. We would like to do a current control exactly like on this document 


Welcome to the forum.

Do you have experience with any other microcontroller(s) ?

 

On Getting Started with STM32:

https://community.st.com/t5/stm32-mcus-products/for-better-learning-stm32-programming-and-debugging/m-p/719468/highlight/true#M260690

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thanks.

I have experience with TMS320F28XXX (Texas Instrument) and PIC (Microchip).

Do you know if it is possible to have support from ST ?
For example, I don't understand that on the picture above, COMP2 is connected to CH1, while it is impossible in the MCU, only COMP1 can be connected to CH1 input, and COMP2 to CH2 input ...

Also, I would expect ZCD to start the timer, and Overcurrent to stop it. So why ZCD would be an "external reset" ?

All that is very confusing.


@Marc38 wrote:

Do you know if it is possible to have support from ST ?


In much the same way you'd get support from Microchip or TI:

AndrewNeil_0-1747901203484.png

AndrewNeil_1-1747901336976.png

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thanks, I will do that.

(On TI E2E, TI engineers help directly.)

There are also ST staff on this forum - but, if you want direct support, you need to go via the support system, or FAEs

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.