12 Replies Latest reply on Apr 2, 2012 7:22 AM by user_1377889

    XXX_WritePeriod(uint16 period) for Counter,Timer or PWM only works for the lower byte

    qingshan.shan

      I have tried using Counter, Timer and PWM components of PSoC3 in my development project. I find there is a same problem:

         

                  Only a lower byte of the uint16 period works properly when I use XXX_WritePeriod(uint16 Period) for Counter, Timer or PWM. If the uint16 period's value is larger than 0xFF, the higher byte of uint16 period 'value is going to overflow to the lower byte( for example,  XXX_WritePeriod(0x0100) is to work as exactly same as XXX_WritePeriod(0x01) ). However, the configuration values of the Period in these components without using   XXX_WritePeriod(uint16 period) to change the period value, they work properly.

         

      Is it possible that the components of Counter, Timer and PWM have some bugs in PSoC Creator 2.0?

         

      Could you please advise me how to sort out this problem?

         

      Qingshan