Вопрос

I am using STM32F205RGT6 Cortex-M3 microcontroller and coding with IAR Embedded Workbench.

I plan to keep the microcontroller in a power saving mode most of the time except when an external component tries to either communicate via SPI (the STM32 microcontroller is meant to be a SP slave) or via USB.

One external compinent is connected via SPI (PB12-15) and PC is connected via USB (PA11-12). The communication works fine - I have tested both the SPI as well as USB. I figured that once I am done setting up SPI and USB I will call a power saving function and add the same function call at the end of interrupt service routines. I have found PWR_EnterSTANDBYMode and PWR_EnterSTOPMode (in stm32f2xx_pwr.h) both of which I tried using. However with such arrangement I cannot establish any communication (SPI or USB) with the microcontroller.

Is there something extra that needs to be configured (for example which pins should wake the microcontroller up)? Am I using wrong function? Or wrong header file? Can you point me to an example resembling such case (I could not find anything similar on ST's website)?

Any constructive feedback would be welcome.

Это было полезно?

Решение

In the mean time I found the application note AN3430 (http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/DM00033348.pdf) which is somehow more digestible (only 38 pages) which gives an excellent overview on power saving in the microcontroller.

Since I don't have access to PA0-WKUP (the wake-up pin) I had to discard using stand-by. Seems that just a simple sleep mode in main loop - by calling __WMI(); - should lower current consumption enough in my case. I might consider stop mode if sleep mode isn't enough but I will have read fragments of datasheet on configuration of EXTI registers that the application notepoints to.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top