<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Tam maly posun v uceni. Zjistil jsem, ze je nutne nejen deaktivovat zarizeni (uart atd) a vypnout hodiny na port, ale ze je nutne piny celeho portu zcela prekonfigurovat na analogovy vstup a vypnout hodiny na portech. Pote je spotreba jiz nizka. Zde ale narazim na dalsi problem. Nejsem schopen po probuzeni zpet rekonfigurovat port respektive nahodit uart aby fungoval. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Turby<br><br><br></div><div><br>21. 3. 2016 v 6:54, Jiří Nesvačil <<a href="mailto:nesvacil@posys.eu">nesvacil@posys.eu</a>>:<br><br></div><blockquote type="cite"><div>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Zdravim,<br>
zkusil bych ten cube configurator, tam si vybrat CPU a hrat si s
periferii, treba Vas neco napadne, co mate zapnute. Nebo i nejake
odpory na GPIO pokud mate... . <br>
<br>
Nebo strycka google <br>
<a class="moz-txt-link-freetext" href="https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3A%2F%2Fmy.st.com%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSTM32L151%20Stop%20mode%20power%20consumption&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=170">https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3A%2F%2Fmy.st.com%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSTM32L151%20Stop%20mode%20power%20consumption&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=170</a><br>
<br>
Jirka<br>
<br>
Dne 20. 3. 2016 v 21:43 Tomas Urbanek napsal(a):<br>
<blockquote cite="mid:BCB407B7-2D02-4A76-B133-2CC06EC75578@me.com" type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Zdravim,
<div class="">byl jsem okolnostmi donucen zacit delat s STM32L a
mam problem se STOP modem. Za zadnou cenu nemohu dosahnout
deklarovane spotreby v tomto modu. Ve STANDBY modu je spotreba
spravna okolo nekolika uA, ale v STOP modu o mnoho vyssi nez by
mela - okolo 200uA. Zkousim na NUCLEO L152RE. Odstranil jsem i
externi pull-up z modreho tlacitka. Jiny tam snad uz neni (uz si
nejsem nicim jisty). Mam aktivni pouze UART2 a PC0-OUT bez
pul-up/down. Vse ostatni v analogovem modu. Zkousel jsem i
nastavit hodiny pouze na MSI a ostanti hodiny vypnout, ale pod
200uA se stejne nedostanu. Zkousel jsem i vypnout hodiny pro
vsechny GPIO (<span style="font-family: 'Courier New';
font-size: 10px;" class="">__GPIOD_CLK_DISABLE()</span>) ale
take bez uspechu.</div>
<div class=""><br class="">
</div>
<div class="">Dokumentace je prachbidna nebo nevim kde hledat.
Podle toho co jsem nasel v datasheetu, specifikaci HALu a
apnotes ci v par dostupnych poznamkach na netu by melo byt vse
spravne, ale nekde delam zrejme chybu. </div>
<div class=""><br class="">
</div>
<div class="">Za kazde nakopnuti spravnym smerem budu neskonale
vdecny jelikoz se s tim trapim uz vice nez tyden do hlubokych
noci az ran a zatim bez zadneho uspechu. Proste se uz tocim jen
dokola.</div>
<div class=""><br class="">
</div>
<div class="">Zde je priklad meho prechodu do stop modu:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">...</b></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class="">
<div style="margin: 0px; line-height: normal;" class=""><b class="">HAL_RTCEx_SetWakeUpTimer_IT</b>(&hrtc,
stopTime, RTC_WAKEUPCLOCK_RTCCLK_DIV16);</div>
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_SuspendTick</b><span style="color:
#000000" class="">();</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class=""><span style="color:
#793d93" class=""><b class="">HAL_PWR_EnterSTOPMode</b></span>(PWR_LOWPOWERREGULATOR_ON,
PWR_SLEEPENTRY_WFI);</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">SystemClock_Config();</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_ResumeTick</b><span style="color:
#000000" class="">();</span></div>
</div>
<div class="">...</div>
<div class=""><br class="">
</div>
<div class="">Jedna z konfiguraci hodin:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class=""><span style="color:
#006141" class="">RCC_OscInitTypeDef</span>
RCC_OscInitStruct;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class=""><span style="color:
#006141" class="">RCC_ClkInitTypeDef</span>
RCC_ClkInitStruct;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(0, 97, 65);" class="">RCC_PeriphCLKInitTypeDef<span style="color: #000000" class=""> PeriphClkInit;</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(78, 144, 114);" class="">/* Enable <span style="text-decoration: underline" class="">Ultra</span> low power mode */</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_PWREx_EnableUltraLowPower</b><span style="color: #000000" class="">();</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(78, 144, 114);" class="">/* Enable the fast wake up from <span style="text-decoration: underline" class="">Ultra</span> low
power mode */</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(78, 144, 114);" class="">//HAL_PWREx_EnableFastWakeUp();</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">__PWR_CLK_ENABLE();</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">OscillatorType</span> =
RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_LSI |
RCC_OSCILLATORTYPE_LSE;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">LSEState</span> =
RCC_LSE_ON;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">HSIState</span> =
RCC_HSI_ON;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">HSICalibrationValue</span> =
16;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">LSIState</span> =
RCC_LSI_ON;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">PLL</span>.<span style="color: #0326cc" class="">PLLState</span> =
RCC_PLL_ON;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">PLL</span>.<span style="color: #0326cc" class="">PLLSource</span> =
RCC_PLLSOURCE_HSI;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">PLL</span>.<span style="color: #0326cc" class="">PLLMUL</span> =
RCC_PLL_MUL3;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_OscInitStruct.<span style="color: #0326cc" class="">PLL</span>.<span style="color: #0326cc" class="">PLLDIV</span> =
RCC_PLL_DIV4;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class=""><span style="color:
#793d93" class=""><b class="">HAL_RCC_OscConfig</b></span>(&RCC_OscInitStruct);</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_ClkInitStruct.<span style="color: #0326cc" class="">ClockType</span> =
RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK |
RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_ClkInitStruct.<span style="color: #0326cc" class="">SYSCLKSource</span> =
RCC_SYSCLKSOURCE_PLLCLK;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_ClkInitStruct.<span style="color: #0326cc" class="">AHBCLKDivider</span> =
RCC_SYSCLK_DIV4;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_ClkInitStruct.<span style="color: #0326cc" class="">APB1CLKDivider</span> =
RCC_HCLK_DIV1;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">RCC_ClkInitStruct.<span style="color: #0326cc" class="">APB2CLKDivider</span> =
RCC_HCLK_DIV1;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class=""><span style="color:
#793d93" class=""><b class="">HAL_RCC_ClockConfig</b></span>(&RCC_ClkInitStruct,
FLASH_LATENCY_0);</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">PeriphClkInit.<span style="color: #0326cc" class="">PeriphClockSelection</span>
= RCC_PERIPHCLK_RTC;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New';" class="">PeriphClkInit.<span style="color: #0326cc" class="">RTCClockSelection</span> =
RCC_RTCCLKSOURCE_LSE;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_RCCEx_PeriphCLKConfig</b><span style="color: #000000" class="">(&PeriphClkInit);</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(78, 144, 114);" class="">//HAL_RCCEx_EnableLSECSS();</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_SYSTICK_Config</b><span style="color:
#000000" class="">(</span><b class="">HAL_RCC_GetHCLKFreq</b><span style="color: #000000" class="">() / 1000);</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_SYSTICK_CLKSourceConfig</b><span style="color: #000000" class="">(SYSTICK_CLKSOURCE_HCLK);</span></div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; min-height: 11px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(78, 144, 114);" class="">/* SysTick_IRQn interrupt configuration */</div>
<div style="margin: 0px; font-size: 10px; line-height: normal;
font-family: 'Courier New'; color: rgb(121, 61, 147);" class=""><b class="">HAL_NVIC_SetPriority</b><span style="color: #000000" class="">(</span><span style="color:
#0326cc" class=""><i class="">SysTick_IRQn</i></span><span style="color: #000000" class="">, 0, 0);</span></div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Turby</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
HW-list mailing list - sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz">www.HW.cz</a>
<a class="moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
</blockquote>
<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>HW-list mailing list - sponsored by <a href="http://www.hw.cz">www.HW.cz</a></span><br><span><a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a></span><br><span><a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a></span><br></div></blockquote></body></html>