CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

how fast can spi_xfer() send?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Honken



Joined: 03 Mar 2004
Posts: 15

View user's profile Send private message

how fast can spi_xfer() send?
PostPosted: Wed Jan 23, 2008 8:40 am     Reply with quote

What is the maximum speed that spi_xfer() function can send a byte?

I have a MCU running @ 96 Mhz, and can only get up to 1.2 Mbit when I declare baudrate to be 1500000 in #spi setup.
Ttelmah
Guest







PostPosted: Wed Jan 23, 2008 10:19 am     Reply with quote

Start with what CPU?.
Now, the SPI setup, will always tend to select the fastest available transfer _below_ your selection. Now, the available selections, will depend on the dividers available on your CPU. Hence the first question...
In most cases for the faster CPU's, the dividers have a first prescaler, that is 1:4,16,64, then a 1:1,2,3,4,5,6,7,8 prescaler after this. So, for a 96MHz source, the /4 prescaler, won't get to this, so the /16 prescaler will have to be selected, giving 6MHz to the second prescaler. The compiler should then select /4, to give 1.5Mhz.
The 'maximum speed', should be way higher than this. There is normally a maximum around 10MHz.
Are you sure you are using the hardware pins?. The maximum for software SPI, is well below the available hardware rates
Try just raising the requested rate slightly.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group