From: faiyaz on 23 Apr 2010 08:48 Dear All, I am developing a hardware which has an MCU - AT91SAM7SE256 from Atmel. There are 6 Si3215(ProSLIC) devices and 2 Si3050(DAA) devices (both from SiLabs) interfaced to SPI master of this MCU in normal individual chip select mode. The frequency of SPI I am using is 4 MHz. The slave devices are placed in 2 columns of 4 devices each. So the trace lengths are big and I haven't provided any signal termination but there is a powerplane running below along the paths of all traces. Now, when I try to communicate to these slave devices, some of them work fine but 2-3 of these slave devices send Hex. FF data all the time. I thought this might be the loading issue so i used buffer 74HC125 to provide more driving current on SPI clock and MOSI signals. But still one of the slave devices was behaving same. But I can see there is a reduction in number of Slaves having problem. The datasheet of AT91SAM7SE says that it can provide maximum 8 mA current on its digital output pins and the datasheet of Si3215 or Si3050 say in their Absolute Maximum ratings that Max Input current on digital Input pins would be 10 mA. I am not sure what these values mean. One interesting observation I have done is when i place the Oscilloscope probe on SPI clock signal, more number of slave devices on board start behaving(sending Hex. FF data) as described above. And it also happens sometime that when I remove the probe from SPI clock, the number of Slaves which were having problem originally, may get reduced. Could this be a loading problem? or Could it be just an improper termination problem? Please explore you views and suggest your solutions. Thanks in advance. Faiyaz Pisuwala --------------------------------------- Posted through http://www.EmbeddedRelated.com
From: WangoTango on 23 Apr 2010 12:05 In article <Nr-dnRDfg9KSCkzWnZ2dnUVZ_sednZ2d(a)giganews.com>, faiyaz.pw(a)n_o_s_p_a_m.gmail.com says... > Dear All, > > I am developing a hardware which has an MCU - AT91SAM7SE256 from Atmel. > There are 6 Si3215(ProSLIC) devices and 2 Si3050(DAA) devices (both from > SiLabs) interfaced to SPI master of this MCU in normal individual chip > select mode. The frequency of SPI I am using is 4 MHz. The slave devices > are placed in 2 columns of 4 devices each. So the trace lengths are big and > I haven't provided any signal termination but there is a powerplane running > below along the paths of all traces. > > Now, when I try to communicate to these slave devices, some of them work > fine but 2-3 of these slave devices send Hex. FF data all the time. I > thought this might be the loading issue so i used buffer 74HC125 to provide > more driving current on SPI clock and MOSI signals. But still one of the > slave devices was behaving same. But I can see there is a reduction in > number of Slaves having problem. > > The datasheet of AT91SAM7SE says that it can provide maximum 8 mA current > on its digital output pins and the datasheet of Si3215 or Si3050 say in > their Absolute Maximum ratings that Max Input current on digital Input pins > would be 10 mA. I am not sure what these values mean. > > One interesting observation I have done is when i place the Oscilloscope > probe on SPI clock signal, more number of slave devices on board start > behaving(sending Hex. FF data) as described above. And it also happens > sometime that when I remove the probe from SPI clock, the number of Slaves > which were having problem originally, may get reduced. > > Could this be a loading problem? or Could it be just an improper > termination problem? Please explore you views and suggest your solutions. > > Thanks in advance. > Faiyaz Pisuwala > Easy enough to test. Put a pull up resistor at the end of the clk, data in,and data out signals and see if the problem clears up. I try to keep my SPI and I2C lines as a single trace with a terminating pull up after the last device, just as standard practice, and have never had a problem with any devices. I would rather have a longer trace length, especially at such a low clock rate, than to have a fan out to multiple signal paths.
From: faiyaz on 24 Apr 2010 02:54 Hi WangoTango, I tried your solution by placing pull-up(2.2K) on SCLK, MOSI and MISO but does not help anyway. There are total 8 SPI Slave devices, all on the same board, and each device needs a separate chip select. And as the MCU has only 4 encoded chip select outputs, i am using an external decoder to decode them to 16 individual chip selects. Only 8 of them are used. --------------------------------------- Posted through http://www.EmbeddedRelated.com
From: Frank Buss on 24 Apr 2010 04:55 faiyaz wrote: > I am developing a hardware which has an MCU - AT91SAM7SE256 from Atmel. > There are 6 Si3215(ProSLIC) devices and 2 Si3050(DAA) devices (both from > SiLabs) interfaced to SPI master of this MCU in normal individual chip > select mode. The frequency of SPI I am using is 4 MHz. The slave devices > are placed in 2 columns of 4 devices each. So the trace lengths are big and > I haven't provided any signal termination but there is a powerplane running > below along the paths of all traces. 4 MHz is not fast, I've seen a board with 25 MHz without problems with a AT91 microcontroller and a wire length of more than 5 cm (with the SSC interface, which is SPI on steroids). There was no termination or some pullup resistors. But you could try to use a series resistor, something like 20 ohm, for reducing ringing. > Now, when I try to communicate to these slave devices, some of them work > fine but 2-3 of these slave devices send Hex. FF data all the time. I > thought this might be the loading issue so i used buffer 74HC125 to provide > more driving current on SPI clock and MOSI signals. But still one of the > slave devices was behaving same. But I can see there is a reduction in > number of Slaves having problem. Ok, just some dumb ideas, I'm sorry if you have already checked it, but your question on the maximum input current suggests that you are a beginner in embedded electronics. This could be some border case. Are you sure, that you are using the right SPI mode? Did you measure with scope SCL and SDA and verify it with the timing diagrams in the datasheet? E.g. if the chip samples SDA with rising SCL edge and you change with rising edge, too, then maybe sometimes it doesn't work anymore, if the capacity on the SCL is higher when you test it with a scope. You have to generate the signal on the other edge than it is sampled. > The datasheet of AT91SAM7SE says that it can provide maximum 8 mA current > on its digital output pins and the datasheet of Si3215 or Si3050 say in > their Absolute Maximum ratings that Max Input current on digital Input pins > would be 10 mA. I am not sure what these values mean. Usually the inputs are high impedance inputs, if it is a CMOS chip and not an old TTL chip. Maybe this means, a digital pin can sink 10 mA max, if it is switched to output. Are you sure your multiplexer generates the right chip select signals, e.g. active low? BTW: If you have 16 IO spare pins on your microcontroller, you can connect all chipselects to your microcontroller and generate it in software. -- Frank Buss, fb(a)frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
From: faiyaz on 26 Apr 2010 01:10
Hi Frank, Yes, I have observed the clock and data signals of SPI on Oscilloscope and yes I am using the correct mode. The MCU changes the data on Leading edge (Falling Edge) of the Clock and Slaves sample it on Trailing edge(Rising Edge). Same way the slaves change the data on leading edge and MCU samples it on trailing edge. I can generate the chip select signals from software but as in our new board model the number of slaves on SPI is going to increase upto 24, so better to generate from external hardware. And BTW, how does my question on the maximum input current suggest that I am a beginner in embedded electronics? Thanks Faiyaz --------------------------------------- Posted through http://www.EmbeddedRelated.com |