cancel
Showing results for 
Search instead for 
Did you mean: 

The FOC V4.0 BUG?

JackyCheung
Associate II
Posted on June 30, 2014 at 05:11

GIGI:

          I use STM3210E debugging of motor, encountered a problem. I try to change the start / stop input keys, but still use the original IO pin.

0690X000006030DQAQ.jpg

7 REPLIES 7
Gigi
ST Employee
Posted on June 30, 2014 at 08:56

Ciao Jacky

I'm sorry but due to time constrain this feature has not implemented in the FW even if it is ready in the WB side.

Ciao

Gigi

JackyCheung
Associate II
Posted on June 30, 2014 at 12:42

Gigi:

       Never mind, I have to write read key function, realize the start and stop. I use the potentiometer is connected PA1 port, DMA channel using ADC1  as Control speed. Now, DMA setting, as if a conflict with the library DMA, my resources with library there is no conflict?

Gigi
ST Employee
Posted on July 01, 2014 at 08:36

Ciao Jacky

The DMA is really needed to read the ADC converted value? Usually an IRQ can be sufficient.

Moreover (I think you did it) you need to take in consideration that some resources of the micro is reserved for the motor control. The resource used depend on the microcontroller used and on the configuration. In many case the ADC1 is used by the motor control and to use it for user conversion you need to use the API of the motor control (Take a look at the MC.h and to the software examples).

Ciao

Gigi

JackyCheung
Associate II
Posted on July 01, 2014 at 12:58

Gigi:

        Thank you for your reply ,   I use the following statement, successfully read ADC value, I did the right thing?    

      oADCMeasurement = MCT_GetPWMnCurrFdbk(oMCT[0]);

      PWMC_ADC_SetSamplingTime(oADCMeasurement,potChannelParameters);

    temp= PWMC_ExecRegularConv(oCurrSensor[0], ADC_Channel_1);

If I want to adjust the motor speed, can read ADC value is converted into velocity parameters, the input to the MCI_ExecSpeedRamp (   )?

Ciao Jacky

The DMA is really needed to read the ADC converted value? Usually an IRQ can be sufficient.

Moreover (I think you did it) you need to take in consideration that some resources of the micro is reserved for the motor control. The resource used depend on the microcontroller used and on the configuration. In many case the ADC1 is used by the motor control and to use it for user conversion you need to use the API of the motor control (Take a look at the MC.h and to the software examples).

Ciao

Gigi

Gigi
ST Employee
Posted on July 01, 2014 at 14:11

Ciao Jacky

Take a look at Project\STM32_SDK_Examples\Potentiometer

I suggest to use

MC_RequestRegularConv (MC_RegularConvState, MC_GetRegularConv) instead of PWMC_ExecRegularConv

Ciao

Gigi

JackyCheung
Associate II
Posted on July 02, 2014 at 04:34

Gigi:

      

      Thank you very much, reference examples, I have successfully used potentiometer adjustment motor.

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards