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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JoLo_4799981
Level 1
Level 1

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,

John

0 Likes
1 Solution
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

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

View solution in original post

0 Likes
1 Reply
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

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

0 Likes