Trying to count ticks of an external 100MHz clock with little to no jitter on a PSOC 6

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

cross mob
BeEs_3215316
Level 1
Level 1

I am trying to generate a highly accurate 1PPS signal derivative from a external 100MHZ clock with no luck. I have tried a counter timer in multiple configurations, but I either get a NACK error or the the counter does not increment at all. Any other ideas or more explicit instructions would be very welcomed.

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

BeEs,

I've attached an example project that makes the connection of the External Oscillator input to a 1 sec pulse to generate an interrupt.  (No code has been included here. )

I realize that you want a very accurate 1 sec clock.  Using a crystal with sub-100 PPM accuracy can give you that.  This attached project does build.  Using the internal IMO clock is good (and cheap) but not very accurate.

However, usually a 100MHz crystal can be added cost as well as using the crystal during low-power modes is power hungry and under some lower power modes not possible.

This is why for an accurate clock at very low frequencies (1 Hz) it is preferable to use an external watch crystal @ 32.768 KHz.  The PSoC products can use this as the external WCO with great power efficiency.  This method is commonly used for BLE timing in very low power modes to wake up the PSoC with high timing accuracy yet but very low current consumption because the clocking rate is much lower than the ExtClk or the ECO.

Len

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

View solution in original post

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

BeEs,

I think that correct way would be to use 100MHz external clock as an input to the PSoC clocks (instead of IMO, take a look into clock tree).  And then derive a 1 Hz clock from the MASTER or BUS clock. No Timer/Counter required.

/odissey1

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

BeEs,

I've attached an example project that makes the connection of the External Oscillator input to a 1 sec pulse to generate an interrupt.  (No code has been included here. )

I realize that you want a very accurate 1 sec clock.  Using a crystal with sub-100 PPM accuracy can give you that.  This attached project does build.  Using the internal IMO clock is good (and cheap) but not very accurate.

However, usually a 100MHz crystal can be added cost as well as using the crystal during low-power modes is power hungry and under some lower power modes not possible.

This is why for an accurate clock at very low frequencies (1 Hz) it is preferable to use an external watch crystal @ 32.768 KHz.  The PSoC products can use this as the external WCO with great power efficiency.  This method is commonly used for BLE timing in very low power modes to wake up the PSoC with high timing accuracy yet but very low current consumption because the clocking rate is much lower than the ExtClk or the ECO.

Len

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