cancel
Showing results for 
Search instead for 
Did you mean: 

L6234 + STM32F4 + MC + STM32 PMSM FOC LIB 3.2

fhorvat
Associate
Posted on November 08, 2012 at 17:35

I want use a Discovery F4 Board to control a L6234.  There is a similar eval board using the L6230 ...

 Pwm works and is being created as set in the Workbench. But there is one ''Problem'': The L6234 does not have a low- and high side input for each half bridge, but a general input and a enable input.

If the general input is high only the high mosfet is enabled, if its low only the low side mosfet is enabled. The enable input activates or deactivates the whole half bridge. 

But in the workbench i cant find an option that represents this kind of Power stage setup.

If this kind of Power stage is not supported i could add an OR Gate between the low and high side pwms (assuming completed inputs). The output would be the enable and the high side pwm could be used as general input.

But i want to avoid using this extra piece of hardware, if a SW solution is possible.

6 REPLIES 6
Gigi
ST Employee
Posted on November 12, 2012 at 17:36

Ciao

In the STM32 FOC lib v3.2 is included a feature that probably

i

s right for you.

You can enable it with the following define present in the Drive parameters.h

#define LOW_SIDE_SIGNALS_ENABLING

ES_GPIO

The enabling signals can be defined in the Control stage parameters.h with the following defines

#define PHASE_UL_GPIO_PORT GPIOB

#define PHASE_UL_GPIO_PIN GPIO_Pin_13

#define PHASE_VL_GPIO_PORT GPIOB

#define PHASE_VL_GPIO_PIN GPIO_Pin_14

#define PHASE_WL_GPIO_PORT GPIOB

#define PHASE_WL_GPIO_PIN GPIO_Pin_15

In this case are used PB13, PB14 and PB15

In this way it is possible to support gate drivers or power module that has three PWM inputs and up to three enabling inputs (L6230, L6234).

With the MC workbench you can't enable that feature so the best way is to modify the template file: <WB Installation folder>\Working\templates_<xxxxxx>\Control stage parameters.th.

Ciao

Gigi

julienboudens9
Associate II
Posted on November 13, 2012 at 16:18

Hello,

If I don't want the 3 enables signals but, only the signals UH, UL, .... How can I do it to avoid this enables signals to attack a low and high side driver.

Thank you

Gigi
ST Employee
Posted on November 13, 2012 at 16:43

Ciao

The default configuration

#define LOW_SIDE_SIGNALS_ENABLING

ENABLE

generates 6 pwm. This is good for gate driver like L639x that requires two PWM for each leg UH,UL VH,VL WH,WL.

Ciao

Gigi

julienboudens9
Associate II
Posted on November 14, 2012 at 09:41

Thank you for your reply,

I have changed the following params in drive parameters.h :

/* PWM generation and current reading */

#define PWM_FREQUENCY                    16000

#define MAX_MODULATION_100_PER_CENT

#define LOW_SIDE_SIGNALS_ENABLING        ENABLE

#define SW_DEADTIME_NS                   800 /*!< Dead-time to be inserted  

                                                           by FW, only if low side

                                                           signals are enabled */

#define HIGH_SIDE_IDLE_STATE              TURN_OFF /*!< TURN_OFF, TURN_ON */

#define LOW_SIDE_IDLE_STATE               TURN_OFF /*!< TURN_OFF, TURN_ON */

                                                                                          

#define CURR_SAMPLING_TIME               1  /*!< Sampling time duration  

                                                           in ADC clock cycles (1 for  

                                                           1.5, 7 for 7.5, ...) */

but I have always the same signals when I'm looking on JP1 et JP6 (on steval ifn003v1)

You'll find a print screen with the two signals

Regards,0690X00000605ElQAI.png

Gigi
ST Employee
Posted on November 14, 2012 at 11:00

Ciao

I have the suspect that you are using the STM32 FOC lib. 3.0 with the

STEVAL-IFN003V1 firmware patch.

In that case the

#define LOW_SIDE_SIGNALS_ENABLING        ENABLE

is skipped by the patch. So I suggest you to go back to the original version of v3.0 (before patch) or pass to the new v3.2.

Ciao

Gigi

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