cancel
Showing results for 
Search instead for 
Did you mean: 

Discrepancy between MCSDK G4 ADC configuration and generated code.

Asantos
Senior

Hi,

I'm beggining with MCSDK.

I load the example "EvalG474E_3Shunt_IHM23v3_HAL.stmcx" and the dialog box "Analog Input and Protection" configure the Sampling Time to 6.5 ADC clk resulting in 96nS. So the ADC clock is supose to be 6.5/96nS = 67.7MHZ. But the generated code shows ADC selected from PLLP with 42.5MHZ and with Async clock/4, so ADC clk = 42.5/4 = 10.625MHZ.

And the generated code is imcomplete, there's nothing in the main loop, no interrupts, etc.

Is there a complete motor control example for any G4 any driver that works? That I just need to compile and program into the flash.

1 ACCEPTED SOLUTION

Accepted Solutions
Claire O.
ST Employee

Hello Asantos,

the easiest way will be to use a G4 example from the Example Projects list from the first page of the MCWorkbench.

you can choose: Speed ramp with Potentiometer on P-NUCLEO_IHM003 kit by example (with STM32G431RB inside)

Thanks and best ergards,

Claire

View solution in original post

1 REPLY 1
Claire O.
ST Employee

Hello Asantos,

the easiest way will be to use a G4 example from the Example Projects list from the first page of the MCWorkbench.

you can choose: Speed ramp with Potentiometer on P-NUCLEO_IHM003 kit by example (with STM32G431RB inside)

Thanks and best ergards,

Claire