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

cross mob
AdIn_4606756
Level 1
Level 1
5 sign-ins First reply posted First question asked

If the 32kHz WCO crystal were to suddenly experience a deviation in frequency, how would the PSoC respond? Would any of the PDL libraries raise errors?

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

Adln,

I've had experience with mechanical shocks (due to drops) on a piezo-electric device such as crystals.  Maybe this discussion will be useful to you or others.

My personal experience is with a crystal driving the CPU clock.  (Note:  This issue was exhibited on a non-PSoC chip.   However, unless HW precautions were implemented on the PSoC this will occur on it too.)

We had to perform a large amount of drop tests on a hard surface.   In the testing, we exhibited many watchdog events.   It was root caused to the CPU being active (non-sleep) and the crystal driving the CPU clock exhibited piezo-electric effects of the mechanical drop.  These effects would cause the CPU to be 'overclocked'.   When the CPU overclocked, it was HIGHLY probable to perform a read of executable code (or data) incorrectly.   When the code was incorrect it was because the minimum read times clocked by the CPU clock was not met.   This 'bad' opcode read would usually cause the code to execute in the wrong path like a train jumping the track and running randomly anywhere.  Eventually the watchdog would stop CPU operation and reset the CPU.  (Hooray for a functional watchdog!)

Your question was about the watch crystal and the WCO.   I predict that a significant drop can contribute to both oscillator overclocking and underclocking.   Since there is no practical means to clock the CPU off the WCO, the above root cause would only apply to the ECO if used.

Usually the WCO is used to clock the wakeups of the CPU for BLE advertisements or scans.  If the overclocking and underclocking don't cancel each other, then it is possible to 'slip' in the scheduled advertisement  or scan events.   The slippage some be relatively minimal.   Additionally, BLE has mechanisms to resync scheduled events so you might miss one or two cycles.

Len

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

View solution in original post

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

Adln,

I've had experience with mechanical shocks (due to drops) on a piezo-electric device such as crystals.  Maybe this discussion will be useful to you or others.

My personal experience is with a crystal driving the CPU clock.  (Note:  This issue was exhibited on a non-PSoC chip.   However, unless HW precautions were implemented on the PSoC this will occur on it too.)

We had to perform a large amount of drop tests on a hard surface.   In the testing, we exhibited many watchdog events.   It was root caused to the CPU being active (non-sleep) and the crystal driving the CPU clock exhibited piezo-electric effects of the mechanical drop.  These effects would cause the CPU to be 'overclocked'.   When the CPU overclocked, it was HIGHLY probable to perform a read of executable code (or data) incorrectly.   When the code was incorrect it was because the minimum read times clocked by the CPU clock was not met.   This 'bad' opcode read would usually cause the code to execute in the wrong path like a train jumping the track and running randomly anywhere.  Eventually the watchdog would stop CPU operation and reset the CPU.  (Hooray for a functional watchdog!)

Your question was about the watch crystal and the WCO.   I predict that a significant drop can contribute to both oscillator overclocking and underclocking.   Since there is no practical means to clock the CPU off the WCO, the above root cause would only apply to the ECO if used.

Usually the WCO is used to clock the wakeups of the CPU for BLE advertisements or scans.  If the overclocking and underclocking don't cancel each other, then it is possible to 'slip' in the scheduled advertisement  or scan events.   The slippage some be relatively minimal.   Additionally, BLE has mechanisms to resync scheduled events so you might miss one or two cycles.

Len

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