Skip to main content
Visitor II
July 27, 2006
Question

Wrong Fpwm?!

  • July 27, 2006
  • 2 replies
  • 597 views
Posted on July 27, 2006 at 10:46

Wrong Fpwm?!

    This topic has been closed for replies.

    2 replies

    lseletronAuthor
    Visitor II
    July 20, 2006
    Posted on July 21, 2006 at 00:26

    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

    zsavov

    Visitor II
    July 27, 2006
    Posted on July 27, 2006 at 10:46

    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