2006-07-27 01:46 AM
2006-07-20 03:26 PM
Hi,
I am using DVP3 emulator set for ST7DALI. I intitialize the PMW module like this: ATCSR=0x12; // Fcount=Fosc and overflow intr enabled ATR=0; // I want minimum Fpwm PWMCR=0x1; // Enable PWM output #0 DCR0=4095; // Duty cycle TRANCR=1; The datasheet specifies that for Fosc=4MHz FpwmMax=2MHz and FpwmMin=1KHz (of course ATR must change). The problem is that I get half these values ie for FpwmMax I get 1Mhz and for FpwmMin I get 500Hz. This happens only when I specify that Fcount=Fosc. If I specify Fcount=32MHz everything is OK. I also set DVP3 for a LITE chip and again I got half the frequencies specified in datasheet. Thank you zsavov2006-07-27 01:46 AM
Hi,
It is normal as you set Fosc to 4Mhz then Fcpu is 2MHz. The value are given according to Fcpu. Have a look in the Clock management block diagram in the datasheet. Best regards Laurent