cancel
Showing results for 
Search instead for 
Did you mean: 

Question about SPI and GPIO use...

greg_corson
Associate
Posted on December 10, 2008 at 22:05

Question about SPI and GPIO use...

1 REPLY 1
greg_corson
Associate
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?