microchip-pic-avr-tools / powersmart-dcld

MPLAB® PowerSmart™ SDK - Digital Control Library Designer Configuration Tool & Code Generator
https://microchip-pic-avr-tools.github.io/powersmart-dcld/
14 stars 4 forks source link

Add Spread Spectrum Modulation to Assembly Code Generation #8

Open areiter128 opened 4 years ago

areiter128 commented 4 years ago

Spread Spectrum Modulation (SSM) is a highly efficient cycle-by-cycle PWM modulation technique used to efficiently spread the noise spectrum to improve EMC. It's commonly implemented by utilizing the LFSR register as pseudo random generator. The random number derived from this register is used as fractional factor which can be masked with user-defined bit masks to restrict the modulation range to a limited percentage ratio. This windowed modulation factor is then multiplied with all timing values (e.g. period, duty cycle, phase shifts, ADC trigger locations) simultaneously. As all target registers are known at runtime, SSM can be implemented as generic code block into the control loop assembly code to ensure most efficient execution.