cancel
Showing results for 
Search instead for 
Did you mean: 

PWM generation with PSC560B54L5

pratibha soni
Associate II
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 discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee
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

View solution in original post

6 REPLIES 6
Erwan YVIN
ST Employee
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
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.

Posted on November 23, 2017 at 15:55

Hi Soni ,

No callback is required

         BR 

                  Erwan

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
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.

Posted on November 24, 2017 at 05:19

there is any need to modify eMIOS register for channel 1 and 2. if it is then what are the modifications?