Yahoo Groups archive

AVR-Chat

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

Thread

spi functions in AVR32

spi functions in AVR32

2011-07-10 by Philippe Habib

I'm using the spi functions in the avr32 framework, but since I can't  
get my code to load onto a real board yet I'm not able to look at the  
waveform and answer this for myself.  I hope someone who know this can  
help me out.

The spi_read and spi_write functions both take an unsigned short.   
That's two bytes.

Does this mean that two 16 clocks will go out with the resulting  
amount of data being written or read, or do they actually just clock  
out 8 clocks per call?

Thanks.

Re: [AVR-Chat] spi functions in AVR32

2011-07-10 by John Samperi

At 07:10 AM 11/07/2011, you wrote:
>Does this mean that two 16 clocks will go out with the resulting
>amount of data being written or read, or do they actually just clock
>out 8 clocks per call?

Look at the data sheet. How wide is SPDR?

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

RE: [AVR-Chat] spi functions in AVR32

2011-07-10 by Philippe Habib

Thank you.  The only thing better than an answer telling me what I want to
know is an answer telling me how to figure it out.
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of John Samperi
Sent: Sunday, July 10, 2011 3:56 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] spi functions in AVR32

At 07:10 AM 11/07/2011, you wrote:
>Does this mean that two 16 clocks will go out with the resulting
>amount of data being written or read, or do they actually just clock
>out 8 clocks per call?

Look at the data sheet. How wide is SPDR?

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************



------------------------------------

Yahoo! Groups Links



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1388 / Virus Database: 1516/3756 - Release Date: 07/10/11

RE: [AVR-Chat] spi functions in AVR32

2011-07-11 by Dave McLaughlin

Actually, I kind of agree with John on this. 

 

OK, so he hasn't told you the answer but he has indicated where to find the
answer. By doing this you are likely to gain a better understanding of the
SPI port.

 

A lot of questions on the likes of this forum can be gained from reading the
datasheets. If you can't read them, then to be honest, you are not going to
be able to programme these devices.

 

You type of question can be gained from reading the datasheet on the SPI
page. If you still don't understand then you can come back and ask for more
information and indicate that you have read the datasheet etc etc.

 

Regards

Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Philippe Habib
Sent: 11 July 2011 06:13
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] spi functions in AVR32

 

  

Thank you. The only thing better than an answer telling me what I want to
know is an answer telling me how to figure it out.

-----Original Message-----
From: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
[mailto:AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> ] On
Behalf
Of John Samperi
Sent: Sunday, July 10, 2011 3:56 PM
To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> 
Subject: Re: [AVR-Chat] spi functions in AVR32

At 07:10 AM 11/07/2011, you wrote:
>Does this mean that two 16 clocks will go out with the resulting
>amount of data being written or read, or do they actually just clock
>out 8 clocks per call?

Look at the data sheet. How wide is SPDR?

Regards

John Samperi






[Non-text portions of this message have been removed]

RE: [AVR-Chat] spi functions in AVR32

2011-07-11 by M W

I recently spent a week trying to figure our how to use one legacy device from one company's datasheet, finally looked for another company's datasheet and found that THEY, unlike the first company, documented what they were doing in a way that "Clicked" in my brain. Mainly, they didn't use the same words for a few very different math terms in the equations on how to set it up LOL - Datasheets have bugs, in addition to the confusion of semantics.

Sometimes it TAKES a little bit of a hint to make things click. This falls under the classification of "There are no stupid questions" IMO, different people just plain communicate differently!

(Friend of mine keeps trying to tell me schematics / pictures in words, he might as well hit my head with a club. Just totally mismatching ways of communication LOL)

  Mark

Re: [AVR-Chat] spi functions in AVR32

2011-07-11 by Philippe Habib

I may not have come across the way I intended.  I was serious.  I'm  
much happier with John's answer than if he had just told me.

I was focused on the framework and how that worked and didn't even  
think to look at the datasheet for what I thought was a dev tool issue.

I totally agree about reading the datasheet in depth and often.
Show quoted textHide quoted text
On Jul 10, 2011, at 8:33 PM, Dave McLaughlin wrote:

> Actually, I kind of agree with John on this.
>
>
>
> OK, so he hasn't told you the answer but he has indicated where to  
> find the
> answer. By doing this you are likely to gain a better understanding  
> of the
> SPI port.
>
>
>
> A lot of questions on the likes of this forum can be gained from  
> reading the
> datasheets. If you can't read them, then to be honest, you are not  
> going to
> be able to programme these devices.
>
>
>
> You type of question can be gained from reading the datasheet on the  
> SPI
> page. If you still don't understand then you can come back and ask  
> for more
> information and indicate that you have read the datasheet etc etc.
>
>
>
> Regards
>
> Dave.
>
>
>
> From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On  
> Behalf
> Of Philippe Habib
> Sent: 11 July 2011 06:13
> To: AVR-Chat@yahoogroups.com
> Subject: RE: [AVR-Chat] spi functions in AVR32
>
>
>
>
>
> Thank you. The only thing better than an answer telling me what I  
> want to
> know is an answer telling me how to figure it out.
>
> -----Original Message-----
> From: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> [mailto:AVR-Chat@yahoogroups.com <mailto:AVR-Chat 
> %40yahoogroups.com> ] On
> Behalf
> Of John Samperi
> Sent: Sunday, July 10, 2011 3:56 PM
> To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> Subject: Re: [AVR-Chat] spi functions in AVR32
>
> At 07:10 AM 11/07/2011, you wrote:
>> Does this mean that two 16 clocks will go out with the resulting
>> amount of data being written or read, or do they actually just clock
>> out 8 clocks per call?
>
> Look at the data sheet. How wide is SPDR?
>
> Regards
>
> John Samperi
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

Re: [AVR-Chat] spi functions in AVR32

2011-07-11 by John Samperi

At 04:00 PM 11/07/2011, you wrote:
>I was focused on the framework and how that worked and didn't even
>think to look at the datasheet for what I thought was a dev tool issue.

Don't beat yourself too much Phil. :-) 25+ years ago I would have had
the same question I guess. Since then having worked with several types
of micro-controller I'm getting the hang of it.

They all pretty much work the same way regardless of the brand of
chip used.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

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.