cancel
Showing results for 
Search instead for 
Did you mean: 

[STM8L152C6] SPI SCK low signal

pierreandre
Associate II
Posted on November 07, 2013 at 15:42

Hi everyone,

I'm new to the STM community and those microcontrollers too, I'm learning to use them;)

I've configured a communication based on SPI through DMA, everything is working excepting the SCK. I've configured it to be low while inactive, this is the case when the SPI module is active and the clock signal toggling, but outside this period the SCK is high.

How is it possible to force the SCK to be low? 

0690X00000604zqQAA.png

#spi
2 REPLIES 2
pierreandre
Associate II
Posted on November 07, 2013 at 17:25

''Problem'' found,

I come from the MSP430 world, each module could be disabled to spare power but keep the configuration (ok rough explanation:p). I wanted to do the same with STM8L and enable the SPI and DMA module only while required for communication, but in fact I can't disable the SPI module or the pin loose the configuration, don't know if this will increase the power consumption of the system, but I think so.

pierreandre
Associate II
Posted on November 08, 2013 at 12:55

Ok, finally make the module working as I want... 

What I do is that I ''manually'' take the control on the SCK pin and force it to output low before disabling the SPI module.

And for starting a communication, I enable the SPI module and then let the SPI module control the SCK setting the pin as external pull up.

So more easy to handle the low power feature in MSP430;) ST should make an app note on how to optimize such things, at least this post should help, even if there is quite nobody on this forum;)