PSOC 5LP: Dynamic SPI master bit rates?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JEv_295166
Level 3
Level 3
First like received

I'm looking to maximize the performance of a simple USB mass storage device with an SPI connected SD Card. Typically one would dynamically vary the SPI bit rate to best match the SD card in use as performance varies wildly according to brand/class/capacity etc.

   

There is no obvious API for setting the SPI master component bit rate. Can anyone point out what I have missed?

   

TAIA

   

Jerry.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You could configure the SPI for "external clock".There are a few APIs to set the frequency of that clock. Have a look into the System Reference Guide (from creator Help).

   

 

   

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You could configure the SPI for "external clock".There are a few APIs to set the frequency of that clock. Have a look into the System Reference Guide (from creator Help).

   

 

   

Bob

0 Likes
JEv_295166
Level 3
Level 3
First like received

Thank you Bob, that is an excellent suggestion, and precisely what I had overlooked.

   

I will investigate the options.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome!

   

 

   

Bob

0 Likes