cancel
Showing results for 
Search instead for 
Did you mean: 

STMF32F401RE with IHM04A1

aknaydn
Associate

I am working with STM32F401RE and IHM04A1 driver board. There is timer1 channel 3 in EN-A (PA10) for IN1A and IN2A. However, there is no timer channel in EN-B which should be used for IN1B and IN2B. What should I do for the timer in EN-B, that is, PC1?

4 REPLIES 4
Peter BENSCH
ST Employee

Welcome @aknaydn, to the community!

EN-A is not controlled via a timer channel, but via a normal GPIO. For bridge 1, this is EN-A, which is controlled via PA10; for bridge 2, this is EN-B, which is connected to PC1.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
aknaydn
Associate

Thanks for your reply. PA10 used for En-A from STM32F401 kit can be operated as Pwm with the 3rd channel of Timer 1, but PC1 used for En-B does not have a timer function. What should I do to use En-B as a timer with its channel?

Peter BENSCH
ST Employee

Pin PA10 of the STM32F401RE has many functions and can also work as a timer output. But how did you come up with the idea of controlling the (global) enable pin of a motor full bridge via PWM? As mentioned, this is done by switching a GPIO (slowly) on or off, as can also be found as:

  • BSP_MOTOR_CONTROL_BOARD_EN_AND_FLAG_A_PIN and
  • BSP_MOTOR_CONTROL_BOARD_EN_AND_FLAG_B_PIN

in the X-CUBE-SPN4 example software.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Peter BENSCH
ST Employee

Pin PA10 of the STM32F401RE has many functions and can also work as a timer output. But how did you come up with the idea of controlling the (global) enable pin of a motor full bridge via PWM? As mentioned, this is done by switching a GPIO (slowly) on or off, as can also be found as:

  • BSP_MOTOR_CONTROL_BOARD_EN_AND_FLAG_A_PIN and
  • BSP_MOTOR_CONTROL_BOARD_EN_AND_FLAG_B_PIN

in the X-CUBE-SPN4 example software.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.