Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Code stuck waiting for SPI transmission but only after power-up. (ATMega644P) SOLVED!!!

2010-03-16 by _wsw_

Maybe the application note "AVR151-Setup and use of the SPI" would be of interrest? There is a whole chapter about the SS pin behaviour...

Stefan

--- In AVR-Chat@yahoogroups.com, Cat C <catalin_cluj@...> wrote:
>
> 
> Thank you Bruce!
> 
> That was IT (I think you mean SS though)!
> 
> It's amazing how... little things like this mess things up, and how lucky that you happened to look into this!
> 
> I still don't understand why it happens, as I enable the SPI port after a long delay (even tried 1s) so the voltage should be stable by then.
> Should I have seen this from somewhere in the Datasheet?
> 
> Thanks again,
> 
> Cat
> 
> > To: AVR-Chat@yahoogroups.com
> > From: obparham@...
> > Date: Mon, 15 Mar 2010 10:40:05 -0700
> > Subject: Re: [AVR-Chat] Code stuck waiting for SPI transmission but only after power-up. (ATMega644P)
> > 
> > Hi Cat,
> > 
> > This may have already been asked and I missed it but, in your 
> > initialization code, do you
> > set the CS pin to OUTPUT before or after you enable the SPI port? If 
> > it's done after, an
> > initial low voltage on the pin may be forcing the SPI port into slave 
> > mode as soon as it's
> > enabled.
> > 
> > Bruce
> 
>  		 	   		  
> 
> [Non-text portions of this message have been removed]
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.