Skip to main content
Angle
Associate III
August 11, 2022
Solved

How to enable the FlexPWM driver setting based on the pwm pin configuration on spc5 board?

  • August 11, 2022
  • 1 reply
  • 1707 views

Hi, can anyone explain to me about this FlexPWM driver?

What is SM0 stand for? and how i can set the driver based on pin configuration? i did not understand about this setting.

Let say i want to configure pin on PORT_E[5] which is PWM_0/A1_0. So, in this setting which one i need to tick to enable the driver?

0693W00000QNRawQAH.png

    This topic has been closed for replies.
    Best answer by ODOUV.1

    I was confused too before to look at the PWM block diagram in the reference manual.

    Please open the RM and look to Figure 419. PWM Block Diagram

    Best regards

    1 reply

    ODOUV.1
    ST Employee
    August 12, 2022

    Hello,

    assuming that your MCU version is a SPC574S

    and looking into the corresponding reference manual (motor control -> FlexPWM):

    https://www.st.com/resource/en/reference_manual/rm0387-spc574sx-32bit-power-architecture-microcontroller-for-automotive-asild-applications-stmicroelectronics.pdf

    it seems that SM0 stands for SubModule0 of a PWM module

    In your case, using pin Port_E[5] , the A1_0 configuration is linked to the SM1 of PWM0

    So in SPC5Studio, you need to enable at least FlexPWM0 SM1:

    0693W00000QNYckQAH.pnghen it will enable the driver FLEXPWMD2:

    0693W00000QNYgfQAH.png 

    Best regards

    Angle
    AngleAuthor
    Associate III
    August 12, 2022

    Okay then may i know how i can recognize whether it its SM0, SM1, SM2 or SM3? I got confuse for this SM0, SM1, SM2, SM3

    ODOUV.1
    ODOUV.1Best answer
    ST Employee
    August 12, 2022

    I was confused too before to look at the PWM block diagram in the reference manual.

    Please open the RM and look to Figure 419. PWM Block Diagram

    Best regards