DIgital signal frequency sweep

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

cross mob
shhe_3888866
Level 1
Level 1
First reply posted First question asked First like given

Hello,

I need to create a square wave signal generator in the range of 1.5Mhz-1.8MHz, in resolution of 10KHz, by PSOC63

How do I do that ?

 

When I try to use the PWM  timer I can't reach the frequency resolution I need.

I can set in the "TopDesign" HW configuration several clocks with the frequencies I need, but I can't change them by SW like I am expecting

 

What would be the best way to do that ?

 

THank,

Shy

 

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

shhe,

I believe that it is possible to swipe PSoC63 output frequency in 1.5-1.8MHz by changing the PLL divider coefficient. For example, swiping the HFCLK (bus clock) in range 60-72MHz, and dividing it by 40. You should consider PLL settling time (~100us), which ultimately limits the swiping speed.

Check PLL API for manual setting of the fractional divider.

Please note that this is rather unusual mode of operation, as the bus frequency of the entire PSoC will ondullate, affecting other components, which depend on clock. But if the swiping generator is the only function PSoC performs, it should work. 

/odissey1

 

View solution in original post

3 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

shhe,

I believe that it is possible to swipe PSoC63 output frequency in 1.5-1.8MHz by changing the PLL divider coefficient. For example, swiping the HFCLK (bus clock) in range 60-72MHz, and dividing it by 40. You should consider PLL settling time (~100us), which ultimately limits the swiping speed.

Check PLL API for manual setting of the fractional divider.

Please note that this is rather unusual mode of operation, as the bus frequency of the entire PSoC will ondullate, affecting other components, which depend on clock. But if the swiping generator is the only function PSoC performs, it should work. 

/odissey1

 

shhe_3888866
Level 1
Level 1
First reply posted First question asked First like given

Hi,

Thank you for your reply

How do I do that ? how do I change the PLL divider coefficient ?

 

Thanks,

Shy

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Shy,

The API call to manually change the PLL is:

cy_en_sysclk_status_t Cy_SysClk_PllManualConfigure(uint32_t clkPath, const cy_stc_pll_manual_config_t * config )	

Look for this function in the PDL docs under the SysClk section.

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes