Skip to main content
Visitor II
January 5, 2025
Question

STMF32F401RE with IHM04A1

  • January 5, 2025
  • 4 replies
  • 585 views

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?

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    January 6, 2025

    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

    aknaydnAuthor
    Visitor II
    January 6, 2025

    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?

    Technical Moderator
    January 6, 2025

    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.

    Technical Moderator
    January 6, 2025

    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.