Clocks Duty Cycle

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

cross mob
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

In PSOC 5LP TRM there is a register to use either "Single Cycle Pulse Mode" or

"50% Duty Cycle Mode".

When a clock is dragged onto schematic what mode is the clock using ?

Is this true for PSOC 4 as well ?

Regards, Dana.

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi Dana,

In general Single Cycle Pulse Mode is used in peripherals that uses only the rising edge of the clocks for operation. This is more like clock gating for rest of the period of the clock. The default setting when you drag and drop a clock component in PSoC 5 is 50 % duty cycle mode. You can test this by doing the following:

1. Drag a drop clock component to clock component. Configure the divider and build it.

2. Find the register address for your clock CLKDIST_DCFGx_CFG2. The creator would use the name <clock_alias>_CFG2. You can find this in the cyfitter.h file

3. Enter debugging mode and run and see what is there in the CLKDIST_DCFGx_CFG2 register.  Use register TRM to decode.

(or)

3. Go to cyfitter_cfg.c file which would have configured all the register based on DWR settings. You should be able to find the following piece of code in the void ClockSetup(void):

/* Configure Digital Clocks based on settings from Clock DWR */

CY_SET_XTND_REG16((void CYFAR *)(CYREG_CLKDIST_DCFG0_CFG0), 0x0BB7u);

CY_SET_XTND_REG8((void CYFAR *)(CYREG_CLKDIST_DCFG0_CFG0 + 0x2u), 0x19u);

This option (gated/ single cycle pulse or  50 % duty cycle) is not configurable with respect to PSoC 4 device. It is done by design.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply