2013-03-04 06:21 AM
2013-03-04 08:45 AM
That does look quite a mess.
Enabling the debugger and having a JTAG pod attached is something you want to remove. Need some progress/state info use serial, GPIO or LEDs until those turn off. RCC_APB1PeriphClockCmd(RCC_APB2Periph_SPI1, DISABLE); // Wrong bus You seem to disable clocks without switching/selecting/configuring an alternate source. Have you looked at any examples for the STM32L-Discovery or EVAL boards? How about turning references off? /* Enable Ultra low power mode */ PWR_UltraLowPowerCmd(ENABLE);2013-03-04 11:02 AM
Like I said its code that worked on the F103 MCU
I only have a F demo board, never got the L series, just had some prototypes of our PCB made with a L151 Low power MCU to see if I could get the Run time Power down. In standby it was ok with that Code. I ll look into that wrong bus and I ll try to switch the AF functions of before entering Standby Thanks for your Reply, I ll keep you informed.2013-03-04 11:26 AM
The STM32L-Discovery runs about $10-12, but the firmware examples are a free download and worth examining for a suggested flow.
For STOP modes, you might also want to examine the state the external pins are left in prior to going into low power.