cancel
Showing results for 
Search instead for 
Did you mean: 

i am using STM32L452REP as MCU and x-nucleo-ihm06a1 as expansion board,is there any solution to driver the motor?

Twang.1
Associate II

The  x-nucleo-ihm06a1 board power supply by the MCU (3.3v) and the motor power supply by a DC power supply.The pwm1/pwm2/ref_pwm is generating by the L452 MCU (timer6),the EN/M1/M2/STBY pin connect to the MCU pinout.

That can't work.I convert pwm1/pwm2 to spwm,that can't work either.And i can't find any solution in manual.please help me,thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Twang.1​,

more details about the two mentioned pins:

  • STBY\RESET input: when forced low, the device is forced into low consumption mode.
  • EN\FAULT input/OD output: this is the power stage enable (when low, the power stage is turned off) and is forced low through the integrated open-drain MOSFET when a failure occurs. 

At power-up, power-down and when leaving the standby condition, the EN/FAULT pin is forced low until the internal circuitry stabilize.

Moreover, keep in mind that the value of the MODEx inputs is latched at power-up and when the device exits the STBY condition (refer to section 6.2 in STSTPIN220 datasheet in particular to Figure 5 at page 10).

Let me know if these info are useful to you, if yes please "Select as Best" button to the proper reply to close the topic.

If you feel a post has answered your question, please click "Accept as Solution"

View solution in original post

4 REPLIES 4
Twang.1
Associate II

problem solved.i used to use spwm to driver the motor,that's quite different.

Hello @Twang.1​ and welcome to the ST Community.

Let me make some comments about the X-NUCLEO-IHM06A1 operation.

The STSTPIN220 is driven by two signals: step clock (STCK pin) and direction (DIR pin).

At each STCK rising edge, the sequencer of the device is increased (DIR input high) or decreased (DIR input low) of a module selected through the MODEx inputs (latched at power-up and when the device exits the STBY condition). The frequency of this signal set the motor speed.

The PWM1 and PWM2 signals are alternative (see board schematic in the data brief), by default the PWM1 is connected to STCK pin (refer to user manual UM2068 section 3.1).

The step clock is a low frequency signal, it does not need to be generated by a high frequency timer.

You can exploit internal MCU timer to toggle a GPIO pin at desired frequency trough interrupt routine.

if I understood correctly you were initially applying both PWM1 and PWM2: did you change the mounting option?

What about the direction setting?

What do you mean, spwm?

Could you share more details about your issue and its solution to help other Community members with similar problem?

If you feel a post has answered your question, please click "Accept as Solution"
Twang.1
Associate II

thank you for your reply,Cristiana.

i was giving PWM(1K 50%Duty) to STCK and GPIO signal (high or low) to the DIR as you say.But it can't work perfectly somehow.Later, i give spwm to STCK,which means sin PWM,but still failed.After trying many times, i found in the manual that the EN/FAULT and STBY didn't work as the way i thought,so i add delay in the STBY edge and pull down the EN/FAULT while power-up ,the motor start working.

i am wondering how the EN/FAULT multiplexing in the stage ,that's still bother me.

Hello @Twang.1​,

more details about the two mentioned pins:

  • STBY\RESET input: when forced low, the device is forced into low consumption mode.
  • EN\FAULT input/OD output: this is the power stage enable (when low, the power stage is turned off) and is forced low through the integrated open-drain MOSFET when a failure occurs. 

At power-up, power-down and when leaving the standby condition, the EN/FAULT pin is forced low until the internal circuitry stabilize.

Moreover, keep in mind that the value of the MODEx inputs is latched at power-up and when the device exits the STBY condition (refer to section 6.2 in STSTPIN220 datasheet in particular to Figure 5 at page 10).

Let me know if these info are useful to you, if yes please "Select as Best" button to the proper reply to close the topic.

If you feel a post has answered your question, please click "Accept as Solution"