1 Reply Latest reply on Oct 28, 2020 8:41 AM by SampathS_11

    Seeking for the guides/ideas on how to generate a PFM and control under two cycle pulses (CY8C24894)


      Dear All,


      I am new in PSoC designer 5.4 and currently using the 8-bits MCU controller for CY8C24894. I have been trying to implement the Pulse Frequency Modulation (PFM) under these kind of pulse patterns (Please see the attachment - PFM_2_Pulses.png).


      I was trying out some of the coding from the directory of example projects related including (PWM, PRS, Counter and Timer) in order to find the possible ways for achieving the results.


      As far I know, the basic concept to generate these kind of pulse as shown in ( Please see the attachment - Triangle_switching_compare_vref.png ).

      However, I was thinking of (Interrupt routine, Counter and Timer) were the register parameters should be applied in....


      Appreciate, I wish if someone can share the experience or technical ideas and what's the particular register or algorithm should be focused on, especially using CY8C24894 can generate the PFM pulse.


      Thanks, Everyone.



      Best Regards,


        • 1. Re: Seeking for the guides/ideas on how to generate a PFM and control under two cycle pulses (CY8C24894)

          Hello John,


          Pulse frequency modulation is not directly supported by the PWM peripherals in CY8C24894, PSoC1 family. It is also not directly supported in many MCU families.


          The best approach to PFM with a PWM peripheral would be to load the period and the compare register on every change in the reference.


          Kindly refer the 8-Bit Pulse Width Modulator Datasheet. On page 9, you can find the API function PWM8_WritePeriod . On page 10, you can find the PWM8_WritePulseWidth. By loading these two values in the PWM User Module, you can change the frequency, and maintain a constant duty cycle. If you want the on time to be constant, you can change the period alone. Depending on the range of frequency you want in your PFM output, you can choose PWM8 or PWM16 or PWM32.


          Best regards,

          Sampath Selvaraj