AnsweredAssumed Answered

Changing PWM period, application seems to work bad

Question asked by mauri1106 on Feb 11, 2013
Latest reply on Mar 1, 2013 by Prashant

Hello guys,

I'm working on BF506F and my application use both PWM channels and 3 ACM events with 14-bit SPORT0 running at 25MHz.

The ACM event "0" is triggered with PWM0 SYNC signal (running at 100kHz), while ACM events "8" and "9" are triggered with PWM1 SYNC signal (running at 20kHz).


I will try to deep describe the issue.


The ACM event number "8" acquires a sinusoidal voltage (50Hz), and PWM1 must generate a sin signal synchronized with this voltage: until the PWM1 period is costant, all works fine, but when I try to change it, all events "8" are lost, while the others are normally processed.

Note that:

  • The maximum range to change PWM1_TM range is +/- 125 sysclock pulses (the whole period is 5000 sysclock pulses).
  • The PWM1 period are update in PWMSYNC ISR and, obviously, PWM1 duties are changed according.
  • The issue appears only when PWM1_TM is changed, if only duties (with constant pwm period) are changed alla works fine.
  • The issue appears both increasing and decreasing PWM1 period.
  • ACM_ET8 and ACM_ET9 register are also modified (at the end of event 9 SPORT0 Rx completion when, I suppose, the ACM timer is not runnning) to always start ADC acquisition at the center point of PWM signal


Any suggestion? Is possible to change PWM_TM register in the same mode of duties register or there are additional rules for this?

If you need additional information, don't hesitate to ask me.

Thanks in advance