Timing violation on PSoC BUS_CLK

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

cross mob
lock attach
Attachments are accessible only for community members.
DaGr_294516
Level 3
Level 3
10 sign-ins 10 questions asked First solution authored

I'm having a timing violation caused by the setup pictured below. I need my bus clock set fast, but for some reason this setup with the shift register is putting a limit of ~20MHz on it... Any idea why or how to remove this limit?  I already tried just slowing the bus clock down, but that breaks the project in other ways.

 

DaGr_294516_1-1622813946421.png

I t*seems* to work fine but we're about to move into production so I need to be certain this isn't a problem waiting to manifest. 

 

A reduced version of the project showing the problem is attached. Thanks in advance.

 

Dan

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

Dan,

The issue you're seeing is that the GPIO pins cannot operate at full CPU clock speeds.  (See GPIO AC spec below)

Len_CONSULTRON_0-1622816032016.png

This is why the max in the "Timing Violation" section is 22.188 MHz (you must have set the VDD in your design to below 2.7V.)

There are two ways to address this.

  1. In TopDesign, get rid of the ADD gate from SDA_0 and route control_1 directly to the shift_in input.  This keeps it all internal where the clocking frequency is much higher.
  2. Make sure that you never switch control_1 or CTRL any faster than 22 MHz.  Then you can ignore this warning and all is well.  Given that you are probably changing control_1 in code, you probably can never achieve a switching time faster than 22 MHz.  That's probably why it's working and you have no issue.

 

 

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

View solution in original post

3 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Dan,

The issue you're seeing is that the GPIO pins cannot operate at full CPU clock speeds.  (See GPIO AC spec below)

Len_CONSULTRON_0-1622816032016.png

This is why the max in the "Timing Violation" section is 22.188 MHz (you must have set the VDD in your design to below 2.7V.)

There are two ways to address this.

  1. In TopDesign, get rid of the ADD gate from SDA_0 and route control_1 directly to the shift_in input.  This keeps it all internal where the clocking frequency is much higher.
  2. Make sure that you never switch control_1 or CTRL any faster than 22 MHz.  Then you can ignore this warning and all is well.  Given that you are probably changing control_1 in code, you probably can never achieve a switching time faster than 22 MHz.  That's probably why it's working and you have no issue.

 

 

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

Amazing that's great news. I need the logic as it is, but none of that will go faster than about 4MHz.

Thanks for your help 🙂

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

DaGr,

Adding double-sync option to the Pins input boosts max clock frequency to 62 MHz (BUS_CLK = 24MHz) or 81MHz (at BUS_CLK=48 MHz). Simply put, the ShifReg input should be synched with the BUS_CLK. Using Sync component boosts max clock to 105 MHz (irrespective to BUS_CLK).

The schematic can be further simplified using custom small Sync32 component

Sync32 custom component for PSoC5 and PSoC4 

/odissey1

Option 1. Configure Pins input to dbl-sync. 

Test_Project_1.png

Option 2. Use Sync component to sync Shift_in signal to the clock

Test_Project_2.pngOption 3. Using custom Sync32 community component to simplify the schematic.

Test_Project_3.png

0 Likes