Skip to main content
pratibha soni
Associate II
November 23, 2017
Solved

PWM generation with PSC560B54L5

  • November 23, 2017
  • 3 replies
  • 1807 views
Posted on November 23, 2017 at 09:56

Hello,

I want to generate PWM with channel 1,2. I saw the PWM example but it is for channel zero, what are the changes required for channel 1 and channel 2.

#pulse-width-modulation-with-diffrenet-channel.
    This topic has been closed for replies.
    Best answer by Erwan YVIN
    Posted on November 23, 2017 at 11:06

    Hello Soni ,

    If you use RLA drivers ,  you can change the configuration (cf screenshot)

    0690X00000608vnQAA.png

    Do not forget to generate after saving your configuration.xml

           Best regards

                     Erwan

    3 replies

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    November 23, 2017
    Posted on November 23, 2017 at 11:06

    Hello Soni ,

    If you use RLA drivers ,  you can change the configuration (cf screenshot)

    0690X00000608vnQAA.png

    Do not forget to generate after saving your configuration.xml

           Best regards

                     Erwan

    pratibha soni
    Associate II
    November 23, 2017
    Posted on November 23, 2017 at 11:32

    Hi Erwan,

    thanks but want more info because I already set the channel configuration but in this channel callback also required? in  for channel 1 and 2 ??whether I am using 0,1,2 or in ch 0 default callback is there.

    Erwan YVIN
    ST Employee
    November 23, 2017
    Posted on November 23, 2017 at 15:55

    Hi Soni ,

    No callback is required

             BR 

                      Erwan

    pratibha soni
    Associate II
    November 23, 2017
    Posted on November 23, 2017 at 17:18

    Only changes in configuration.xml or nothing else... Even not in code too??

    pratibha soni
    Associate II
    November 24, 2017
    Posted on November 24, 2017 at 05:44

    will be like this?

    for channel 0

    pwm_lld_enable_channel(&PWMD5, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD5, 5000), 0);

    for channel 1

    pwm_lld_enable_channel(&PWMD5, 1, PWM_PERCENTAGE_TO_WIDTH(&PWMD5, 5000), 0);

    for channel 2

    pwm_lld_enable_channel(&PWMD5, 2, PWM_PERCENTAGE_TO_WIDTH(&PWMD5, 5000), 0);

    waiting for reply.