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.
Hello Soni ,
If you use RLA drivers , you can change the configuration (cf screenshot)
Do not forget to generate after saving your configuration.xml
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.
Hi Soni ,
No callback is required
Only changes in configuration.xml or nothing else... Even not in code too??
there is any need to modify eMIOS register for channel 1 and 2. if it is then what are the modifications?
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.
Retrieving data ...