Forums - SPI Master Clock Speed

2 posts / 0 new
Last post
SPI Master Clock Speed
rabryn
Join Date: 12 Jun 18
Posts: 6
Posted: Thu, 2021-02-18 11:52

Hello,

I am using the QCA4020's SPI master to communicate to a device that has a maximum SCLK frequency of 2MHz.  I'd like to operate the QCA4020's SPI master's SCLK at 500KHz or 1MHz.  I have the SPI master working and can see the SCLK and MOSI data on my logic analyzer, however, it seems I cannot reduce the SPI's SCLK frequency to an acceptable value.  If I set qapi_SPIM_Config_t's max_Slave_Freq_Hz to 100,000 it outputs at 50MHz.  If I set it to 20M I see 16.67MHz.

I assume 500KHz is too low and is simply not being recognized as a valid max_Slave_Freq_Hz.  Is it possible to reduce the QCA4020's SPI master's SCLK to a value less than 2MHz?  Is there a divider I can adjust somewhere?

Thank you,

Ryan

  • Up0
  • Down0
raja_pedada
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 297
Posted: Thu, 2021-02-25 15:53

QCA4020 SPI supports clock frequency between 3MHz~48MHz.
The limitation is due to fixed 48MHz internal clock and the divider is 4 bits (0~`5) resulting in final clock between 48MHz~3MHz.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.