UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer rtg
Observer
2,495 Views
Registered: ‎05-23-2017

Picoblaze SPI clock frequency (bit rate)

How do we specify the SPI clock frequency or the SPI speed in Picoblaze?  For example, in the reference design KC705_KCPSM6 where provided by Xilinx and written by @chapman where do I find the SPI clock speed?

Tags (3)
0 Kudos
3 Replies
Scholar pratham
Scholar
2,464 Views
Registered: ‎06-05-2013

Re: Picoblaze SPI clock frequency (bit rate)

@rtg 

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
forums.JPG
0 Kudos
Observer rtg
Observer
2,447 Views
Registered: ‎05-23-2017

Re: Picoblaze SPI clock frequency (bit rate)

How do I set the set bit rate in the code?  I am using different Picoblaze code.  It only mentions that in this design it is system clock by 24.

0 Kudos
Xilinx Employee
Xilinx Employee
2,445 Views
Registered: ‎09-05-2007

Re: Picoblaze SPI clock frequency (bit rate)

In addition the text shown on page 4 of 'KC705_KCPSM6_SPI_Flash_reference_design.pdf' you should take a look at page 9 where you will see that I have shown the subroutine of PSM code that implements the SPI communication that generates the SPI clock signal. I have presented the waveforms showing how the code executes a loop of 14 instructions and therefore generates an SPI clock pulse once every 28 system clock cycles.

 

Please remember that this is a 'reference design' with documentation and comprehensive comments in the source code to be as educational as possible. You are free to use the reference designs as they provided but generally they are a starting point and reference to implement exactly what you need. In the case of SPI communication it may be desirable to increase the communication rate by adding a small hardware peripheral to perform the serialisation of bytes and it would be your implementation of that parallel/serial converter that would then define the SPI clock rate.    

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos