cancel
Showing results for 
Search instead for 
Did you mean: 

how to configure flex pwm to give complementary pwm of 20 khz.

kjay
Associate II

.i need help with calculating clock and time peroid and waht is other pwm pin if pwm0 has d10 which is complemetary pin in spc56el70l5-disp

82 REPLIES 82
kjay
Associate II

ya i found now only its been in decimal ,i transmitted hexadecimal....ok thank you ...

kjay
Associate II

hi zambrano.luigi,

i need to configure another channel to produce same 20khz complementary pwm...that is 2 complemetary outputs, 4 pwm pins...i tried and first 2 only working ...what am i missing ...i tried configuring pwm1 also ..i couldnt find pins for that..help me i attach my application

kjay
Associate II

this my file

zambrano.luigi
Senior III

Hi,

you have to configure the output pins on which the new complementary PWM signals are output. For example, you can use the pin C[15] for the FlexPWM0 A1 and D[0] for the FlexPWM0 B1 (see A1_B1.jpg in attachment). In this way the new 2 complementary PWM signals will be output on the pin D9 and D10 of the connector X6 on the SPC56xL Discovery board.

zambrano.luigi
Senior III

In attachment the modified version of your project.

Regards,

Luigi

thanks for the help...i already configured in pin map editor isnt that enough ...or i should configure in a way you stated...

kjay
Associate II

hi,

i have to capture duty cycle of the pwm which has 85 to 115khz frequency..can u provide me example of configuring and efficient capture of duty cycle..i need to be accurate because it contains sensor diagnostics information as duty cycle.thank you

zambrano.luigi
Senior III

Hi,

the input capture functionality in the SPC56EL is based on the eTImer module. Since the eTImer module is based on 16bit counters, the maximum frequency measured by the ICU driver (without overflow) is

2^16 * (ICU low level driver Frequency).

ICU low level driver frequency is the frequency setting within the ICU low level driver component. This frequency must sadisfy the following formula

ICU low level driver Frequency = Motor Control Clock Frequency / eTimer Prescaler

where the eTimer Prescaler can be equal to 1, 2, 4, 8, 16, 32, 64 or 128.

So, if you know the maxim frequency that you want to measure, you can select the ICU low level driver frequency and the Motor Control Clock frequency in order to have a right value for the eTimer Prescaler.

Regards,

Luigi

cannot edit io setting on configuration.xml

zambrano.luigi
Senior III

Hi,

if you open the Pin Map Wizard (graphic pin editor, please, see picture in attachment) to edit the pins, you cannot use the standard edit view till you don't close the Pin Map Wizard. In other words, there is only one active edit view at a time, the standard view or the Pin Map Wizard.

Best Regards,

Luigi