Skip to main content
greg_corson
Associate
December 10, 2008
Question

Question about SPI and GPIO use...

  • December 10, 2008
  • 1 reply
  • 481 views
Posted on December 10, 2008 at 22:05

Question about SPI and GPIO use...

    This topic has been closed for replies.

    1 reply

    greg_corson
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 12:56

    I'm new to the STM32 and had a couple of questions I couldn't find in the reference manual.

    1) How do you calculate the SPI data rate? I saw the baud-rate control/scaler register that scales from fpCLK, is this the main processor it's dividing down from? ie: I'd have to set a divisor of 64 to get a rate of around 1mhz?

    2) After enabling the SPI, can you still grab some of it's pins for GPIO use? I'm not using MISO or NSS and was going to use those as device enable outputs.

    3) When you program the GPIO ''output max speed'' to 2mhz, does this imply that if you do two back-to-back writes to the same GPIO, the processor busy-waits on the second one to keep the speed down to 2mhz?