AnsweredAssumed Answered

spi speed configuration of STM32L

Question asked by shan on Mar 4, 2014
Latest reply on Mar 4, 2014 by Clive One
Hi all,

I am playing with SPI examples of STM32L recently and would like to ask a simple question about the SPI clock rate.  

When I read through the datasheet, it mentions APB1 and APB2 have maximal frequency of 32MHz. I know that we need to set the GPIOx_OSPEEDR for SCK/nSEL/MOSI pins in SPI master mode.  But in the description of GPIOx_OSPEEDR, it has four mode of 400k, 2M, 10M and 40MHz.  Why is the highest speed more than the maximal clock rate?

If I set the prescaler to 2 (000) with 40MHz GPIOx_OSPEEDR, does it mean 20MHz SPI clock rate or 16MHz SPI clock rate?

I may have some dummy misunderstandings between the term SPI speed and the clock rate of STM32L.  Could some one please help? 


Thanks a lot! 

~S

Outcomes