SPI: SCK input too sensitive?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI: SCK input too sensitive?

2,968 Views
pittbull
Contributor III
Hello,
I'm using the SPI (slave mode) of an S12XA256 to sample serial data from another device (clock frequency is ~500kHz). At roughly 1..2-hourly intervals there seems to be a glitch on SCK that disturbs SPI and shifts in an additional bit. How can I get rid of that? I fiddled around with low-pass filters but it doesn't work until now...

Anyone can help?
Thanks in advance,
pittbull

Message Edited by pittbull on 04-26-200604:13 AM

Labels (1)
0 Kudos
2 Replies

413 Views
rocco
Senior Contributor II
Hi, pittbull:

An intermittent that happen every few hours will be a pain to find. I would try to find the source of the glitch, and attack it at the source.

What is the source of the clock? Could some event be causing it to glitch? I have found these problems hard to deal with without using ~SlaveSelect, but easy with ~SlaveSelect.

Nowadays, whenever I use the SPI in slave mode, I bring ~SS high when the SPI is idle. That will re-synchronize the SPI clock if it does get in trouble. If the glitch occurs outside of a transfer, it will be ignored if ~SS is high.

Hope it helps . . .
0 Kudos

413 Views
pittbull
Contributor III
Hello rocco,

Thanks for the reply.
The clock source is a sensor with an SPI-like interface (called SSI). Meanwhile, I replaced the sensor with another S12X module which simulates SPI using I/O ports and always send the same data word. And - surprisingly - the misfeature still exists!

There must be another problem. Probably the supply voltage collapses for a very short time or something like that.

Thanks again,
pittbull
0 Kudos