【ST NUCLEO-U5A5ZJ-Q开发板测评】06 STM32U5系列的低功耗有多强
<div class='showpostmsg'> 本帖最后由 怀揣少年梦 于 2024-3-14 13:18 编辑<article data-content="[{"type":"block","id":"3060-1621846615933","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"p5PQ-1621846617594","leaves":[{"text":"这期主要了解一下STM32实现超低功耗的机制以及实测一下STM32U5各种低功耗模式低功耗数据。","marks":[]}]}],"state":{}},{"type":"block","id":"TGhl-1707200525854","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"lyKK-1707200525852","leaves":[{"text":"一、STM32U5A5官方功耗数据","marks":[]}]}],"state":{}},{"type":"block","id":"1vIH-1710292378292","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"bEbA-1710292378291","leaves":[{"text":"STM32U5A5是一款超低功耗的Cortex-M33内核的MCU,属于STM32U5系列;STM32U5系列是新一代超低功耗MCU,并且也是设计最为复杂的低功耗MCU。","marks":[]}]}],"state":{}},{"type":"block","id":"EesF-1710292472467","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"4yNd-1710292472466","leaves":[{"text":"官方给出的功耗数据如图:停止模式都在微安级别;待机和关断模式都达到了nA级别;","marks":[]}]}],"state":{}},{"type":"block","id":"o8nF-1710292356436","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9174/WEBRESOURCE9efb71fde4fcdf9c8655abc8bb10312e","width":895,"height":750,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9174/WEBRESOURCE9efb71fde4fcdf9c8655abc8bb10312e","initialSize":{"width":895,"height":750}}},{"type":"block","id":"2Y92-1710292030285","name":"paragraph","data":{"style":{"textIndent":0}},"nodes":[{"type":"text","id":"bDTD-1710292030283","leaves":[{"text":"二、STM32U5系列实现超功耗的原因","marks":[]}]}],"state":{}},{"type":"block","id":"Peg9-1710292660313","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"1ABs-1710292660311","leaves":[{"text":"1、支持SMPS;","marks":[]}]}],"state":{}},{"type":"block","id":"ZBLx-1710293155654","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"WBip-1710293155653","leaves":[{"text":"STM32U5系列MCU支持在运行和低功耗模式下使用内部 SMPS,从而能够设计出非常高效的低功耗应用。注意带有“Q”后缀的 STM32U5系列器件(例如 STM32U5xxxxQ),低功耗设计可应用于工业智能流量计、健康及健身类穿戴产品、医疗监护设备、POS支付终端等对于功耗和安全性同时有高要求的场景。","marks":[]}]}],"state":{}},{"type":"block","id":"2BCF-1710292803527","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"NT9b-1710292803526","leaves":[{"text":"2、40nm先进工艺","marks":[]}]}],"state":{}},{"type":"block","id":"WRTM-1710293165977","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"9FfF-1710293165976","leaves":[{"text":"我们知道越先进的工艺代表着功耗性能越好,之前的STM32采用90nm工艺制程,而STM32U5采用更先进40nm工艺,那功耗必然会降低,并同时改善了漏电流和动态电流。","marks":[]}]}],"state":{}},{"type":"block","id":"WFP8-1710292943917","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"z4XB-1710292943916","leaves":[{"text":"3、优化功耗管理","marks":[]}]}],"state":{}},{"type":"block","id":"RCd5-1710293191083","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"3NPV-1710293191082","leaves":[{"text":"STM32U5改善了功耗管理模式,增加了低功耗后台自主模式(LPBAM,Low Power Background Autonomous Mode),和一些可以在低功耗下运行的外设和功能。STM32U5中有16kB SRAM作为低功耗后台的自主模式的存储空间,可以在CPU休眠的情况下,将I2C、SPI、串口、ADC等外设数据通过LPDMA传送至其中,然后当数据累积到一定数量时再唤醒CPU进行一次性批处理。通过避免频繁唤醒CPU,从而达到节省功耗的目的。","marks":[]}]}],"state":{}},{"type":"block","id":"l3UU-1710293051965","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"a1Kx-1710293051964","leaves":[{"text":"4、集成了高频率的DC/DC以及LDO。","marks":[]}]}],"state":{}},{"type":"block","id":"HrR4-1710293199293","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"slSN-1710293199292","leaves":[{"text":"通过集成高频率DC/DC,可减少VDD至内核供电的转换损耗,实现最优化的动态功耗和最快速的动态响应。而通过LDO,则可解决DC/DC启动时间较慢的弊端","marks":[]}]}],"state":{}},{"type":"block","id":"k1ls-1710293202560","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"b3Wn-1710293202559","leaves":[{"text":"5、分区FLASH和SRAM","marks":[]}]}],"state":{}},{"type":"block","id":"kmhQ-1710293234640","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"xWX8-1710293234639","leaves":[{"text":"类似LPRAM,提供分区的FLASH和SRAM,用户可以根据应用场景,将不常用的Flash关闭并按需开启,又或者通过降低FLASH读取速度降低功耗","marks":[]}]}],"state":{}},{"type":"block","id":"D8G8-1710293401156","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"mKRw-1710293401155","leaves":[{"text":"","marks":[]}]}],"state":{}},{"type":"block","id":"bf9f-1707200453043","name":"paragraph","data":{"style":{"textIndent":0}},"nodes":[{"type":"text","id":"weLa-1707200453041","leaves":[{"text":"三、低功耗模式有哪些","marks":[]}]}],"state":{}},{"type":"block","id":"NQmM-1710293407639","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"zMoX-1710293407638","leaves":[{"text":"1、睡眠模式","marks":[]}]}],"state":{}},{"type":"block","id":"vIqS-1710293556589","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"If26-1710293556588","leaves":[{"text":"CPU 时钟关闭,包括 Cortex-M33 内核(例如 NVIC、SysTick 等)在内的所有外设都可以运行,并在发生中断或事件时唤醒 CPU。","marks":[]}]}],"state":{}},{"type":"block","id":"P00u-1710293556593","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"5ZQX-1710293556592","leaves":[{"text":"2、停机模式","marks":[]}]}],"state":{}},{"type":"block","id":"JNi2-1710293556595","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"2jxt-1710293556594","leaves":[{"text":"停机模式基于 Cortex-M33 深度睡眠模式与外设时钟门控的组合。核心域中的所有时钟均停止。禁用 PLL、MSIS、MSIK、HSI16 和 HSE 振荡器,如果外设请求,则可以在停机 0、停机 1、或停机 2 模式下启用 MSIS、MSIK、HSI16。","marks":[]}]}],"state":{}},{"type":"block","id":"b3Gd-1710293556603","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"M4GA-1710293556602","leaves":[{"text":"低功耗后台自主模式(LPBAM)","marks":[{"type":"bold"}]}]}],"state":{}},{"type":"block","id":"IA6e-1710293556605","name":"paragraph","data":{"style":{},"version":1},"nodes":[{"type":"text","id":"5PeR-1710293556604","leaves":[{"text":"一些外设是自主的,可以在需要时通过请求其内核时钟(最高 24MHz 的 MSIK,或 HSI16)及其总线(APB 或AHB)而在停机 0、停机 1、或停机 2 模式下运行,以便与 DMA(GPDMA1 或 LPDMA1,取决于外设和功耗模式)传输数据。","marks":[]}]}],"state":{}},{"type":"block","id":"mmse-1710293556607","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"Go2g-1710293556606","leaves":[{"text":"3、 待机模式","marks":[]}]}],"state":{}},{"type":"block","id":"WLPS-1710293556611","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"LUiv-1710293556610","leaves":[{"text":"待机模式实现在保留欠压复位功能时的最低功耗:关闭内部调压器,从而关闭核心域。PLL、MSI(MSIS 和MSIK)RC、HSI16 RC 和 HSE 晶振也会关闭。RTC 可保持激活状态。可选择保留 8、56 或 64 KB 的 SRAM2。可以施加内部上拉或下拉来保持 I/O 电平。唤醒后的系统时钟为 MSIS,最高 4MHz。","marks":[]}]}],"state":{}},{"type":"block","id":"aQ8v-1710293556615","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"BQIj-1710293556614","leaves":[{"text":"4、关断模式","marks":[]}]}],"state":{}},{"type":"block","id":"aWee-1710293556617","name":"paragraph","data":{"style":{},"version":1},"nodes":[{"type":"text","id":"2Gsi-1710293556616","leaves":[{"text":"关断模式下功耗达到最低。该模式基于深度睡眠模式,其中调压器被禁用。因此核心域断电。通过关闭内部稳压器,以及禁用耗电监控,该模式可实现最低电流消耗。借助某一个(共五个)唤醒引脚或复位引脚,能够从该模式唤醒。由低速外部振荡器(LSE)定时的 RTC 在此模式下也是起作用的,具有唤醒功能模式。","marks":[]}]}],"state":{}},{"type":"block","id":"guLV-1710293645533","name":"paragraph","data":{"style":{},"version":1},"nodes":[{"type":"text","id":"kwrL-1710293645532","leaves":[{"text":"","marks":[]}]}],"state":{}},{"type":"block","id":"XgTS-1710293649328","name":"paragraph","data":{"style":{"textIndent":0},"version":1},"nodes":[{"type":"text","id":"Z3yv-1710293649326","leaves":[{"text":"四、实测功耗数据","marks":[]}]}],"state":{}},{"type":"block","id":"Lp3L-1710293657409","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"lttx-1710293657408","leaves":[{"text":"1、配置工程","marks":[]}]}],"state":{}},{"type":"block","id":"dqyo-1710293670771","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"UQxU-1710293670770","leaves":[{"text":"1)直接使用STM32CubeMX根据板子创建工程","marks":[]}]}],"state":{}},{"type":"block","id":"yHJN-1710293798023","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9219/WEBRESOURCE892229bf8e12924005865aa659663c99","width":1551,"height":842,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9219/WEBRESOURCE892229bf8e12924005865aa659663c99","initialSize":{"width":1551,"height":842}}},{"type":"block","id":"N8gP-1710293798026","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"hfl1-1710293798025","leaves":[{"text":"2)不配置外设","marks":[]}]}],"state":{}},{"type":"block","id":"400Y-1710293900625","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9223/WEBRESOURCE45a723be6d00ebf101ab1dc5b76c17b7","width":453,"height":449,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9223/WEBRESOURCE45a723be6d00ebf101ab1dc5b76c17b7","initialSize":{"width":453,"height":449}}},{"type":"block","id":"Ff55-1710293900628","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"eNr8-1710293900627","leaves":[{"text":"最后产生工程即可","marks":[]}]}],"state":{}},{"type":"block","id":"uwDI-1710293914003","name":"paragraph","data":{"style":{"textIndent":28},"version":1},"nodes":[{"type":"text","id":"obni-1710293914002","leaves":[{"text":"3)在main函数里面添加如下代码","marks":[]}]}],"state":{}},{"type":"block","id":"2NBm-1710294325574","name":"code","data":{"language":"","theme":"default","wrap":false},"nodes":[{"type":"block","id":"SLuC-1710294325573","name":"code-line","data":{},"nodes":[{"type":"text","id":"iSCJ-1710294325572","leaves":[{"text":" HAL_Delay(5000); //避免MCU上电后直接休眠无法唤醒\r\r","marks":[]}]}]},{"type":"block","id":"eQKs-1710294363726","name":"code-line","data":{},"nodes":[{"type":"text","id":"wlGM-1710294363725","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"nEQn-1710294327733","name":"code-line","data":{},"nodes":[{"type":"text","id":"QeCC-1710294327732","leaves":[{"text":"//HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);","marks":[]}]}]},{"type":"block","id":"WA2s-1710294327735","name":"code-line","data":{},"nodes":[{"type":"text","id":"d6aO-1710294327734","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"lHwe-1710294327737","name":"code-line","data":{},"nodes":[{"type":"text","id":"hc97-1710294327736","leaves":[{"text":"//HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);","marks":[]}]}]},{"type":"block","id":"W3Fl-1710294327739","name":"code-line","data":{},"nodes":[{"type":"text","id":"xw9y-1710294327738","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"2CCw-1710294327741","name":"code-line","data":{},"nodes":[{"type":"text","id":"UhBP-1710294327740","leaves":[{"text":"//HAL_PWREx_EnterSTOP1Mode(PWR_STOPENTRY_WFI);","marks":[]}]}]},{"type":"block","id":"yPpi-1710294327743","name":"code-line","data":{},"nodes":[{"type":"text","id":"zueg-1710294327742","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"P889-1710294327745","name":"code-line","data":{},"nodes":[{"type":"text","id":"G1ny-1710294327744","leaves":[{"text":"//HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);","marks":[]}]}]},{"type":"block","id":"iT68-1710294327747","name":"code-line","data":{},"nodes":[{"type":"text","id":"r4mO-1710294327746","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"vR74-1710294327749","name":"code-line","data":{},"nodes":[{"type":"text","id":"5FTx-1710294327748","leaves":[{"text":"//HAL_PWREx_EnterSTOP3Mode(PWR_STOPENTRY_WFI);","marks":[]}]}]},{"type":"block","id":"z69e-1710294327751","name":"code-line","data":{},"nodes":[{"type":"text","id":"hIr4-1710294327750","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"liiy-1710294327753","name":"code-line","data":{},"nodes":[{"type":"text","id":"hv1m-1710294327752","leaves":[{"text":"//HAL_PWR_EnterSTANDBYMode();","marks":[]}]}]},{"type":"block","id":"TLtc-1710294327755","name":"code-line","data":{},"nodes":[{"type":"text","id":"cmiw-1710294327754","leaves":[{"text":"","marks":[]}]}]},{"type":"block","id":"coPH-1710294327757","name":"code-line","data":{},"nodes":[{"type":"text","id":"MzPk-1710294327756","leaves":[{"text":"//HAL_PWREx_EnterSHUTDOWNMode();","marks":[]}]}]}],"state":{}},{"type":"block","id":"LiGf-1710293943784","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"PF3J-1710293943785","leaves":[{"text":"2、实测数据","marks":[]}]}],"state":{}},{"type":"block","id":"pOZR-1710294379525","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"iXO8-1710294379524","leaves":[{"text":"默认时钟频率是16M","marks":[]}]}],"state":{}},{"type":"block","id":"9vrs-1710256797688","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9139/WEBRESOURCE97a3d41c0787a4d7d97d0842520d1861","width":1913,"height":821,"fromIdentity":""},"nodes":[],"state":{"renderSource":"https://note.youdao.com/yws/res/9139/WEBRESOURCE97a3d41c0787a4d7d97d0842520d1861","initialSize":{"width":1913,"height":821},"loading":false}},{"type":"block","id":"GxsP-1710256797692","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"cudr-1710256797691","leaves":[{"text":"1)运行模式","marks":[]}]}],"state":{}},{"type":"block","id":"5Mom-1710294434605","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"e3PC-1710294434604","leaves":[{"text":"16MHz运行模式 2.1mA;","marks":[]}]}],"state":{}},{"type":"block","id":"ucFJ-1710295022199","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9249/WEBRESOURCEd71f1362e16cbbd11ab32564ac4fb951","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9249/WEBRESOURCEd71f1362e16cbbd11ab32564ac4fb951","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"LtEN-1710294494834","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"RHYH-1710294494832","leaves":[{"text":"160MHz 运行模式 7.4mA","marks":[]}]}],"state":{}},{"type":"block","id":"Q0s8-1710295091201","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9251/WEBRESOURCE7cc218f21677070a110d4a7c4cfb09f6","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9251/WEBRESOURCE7cc218f21677070a110d4a7c4cfb09f6","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"ggOQ-1710294517527","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"0VLK-1710294517526","leaves":[{"text":"2)休眠模式 1.9mA 和16M的运行模式差不多","marks":[]}]}],"state":{}},{"type":"block","id":"OASx-1710295010245","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9246/WEBRESOURCEbedefbb315946152ce86ef4b63791d02","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9246/WEBRESOURCEbedefbb315946152ce86ef4b63791d02","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"75eG-1710294570381","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"PeDT-1710294570380","leaves":[{"text":"3)停止模式","marks":[]}]}],"state":{}},{"type":"block","id":"lwku-1710294591120","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"6x44-1710294591119","leaves":[{"text":"模式0和模式1功耗一致: 49.4uA;","marks":[]}]}],"state":{}},{"type":"block","id":"RaXi-1710295619258","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9253/WEBRESOURCE09e652a72a288d60bb3713f8ec28a69c","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9253/WEBRESOURCE09e652a72a288d60bb3713f8ec28a69c","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"heWW-1710294628779","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"UAbI-1710294628778","leaves":[{"text":"模式2::20.5uA;","marks":[]}]}],"state":{}},{"type":"block","id":"9VVP-1710295627208","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9255/WEBRESOURCE03104ff12710996f4521cd68e32dc8bf","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9255/WEBRESOURCE03104ff12710996f4521cd68e32dc8bf","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"1TBW-1710294653901","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"UdGH-1710294653900","leaves":[{"text":"模式3:7.2uA;","marks":[]}]}],"state":{}},{"type":"block","id":"KcJ5-1710295638160","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9257/WEBRESOURCE33bc27809c49579d4b6ce2cd0f75c664","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9257/WEBRESOURCE33bc27809c49579d4b6ce2cd0f75c664","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"g0Kj-1710294664209","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"5pCL-1710294664208","leaves":[{"text":"","marks":[]}]}],"state":{}},{"type":"block","id":"sFq5-1710294666435","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"wRut-1710294666434","leaves":[{"text":"4)待机模式 0.6uA ","marks":[]}]}],"state":{}},{"type":"block","id":"3heb-1710295647201","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9260/WEBRESOURCE051e3a14eeecb116a6c34e81f51d6cef","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9260/WEBRESOURCE051e3a14eeecb116a6c34e81f51d6cef","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"mVUF-1710294681783","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"BnHz-1710294681782","leaves":[{"text":"5)关断模式 0.5uA","marks":[]}]}],"state":{}},{"type":"block","id":"fCP5-1710295653211","name":"image","data":{"version":1,"url":"https://note.youdao.com/yws/res/9262/WEBRESOURCE39aa69b8658ac64df8dc1b96901466d8","width":1279,"height":1706,"fromIdentity":""},"nodes":[],"state":{"loading":false,"renderSource":"https://note.youdao.com/yws/res/9262/WEBRESOURCE39aa69b8658ac64df8dc1b96901466d8","initialSize":{"width":1279,"height":1706}}},{"type":"block","id":"fbcv-1710294724017","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"LXs2-1710294724016","leaves":[{"text":"","marks":[]}]}],"state":{}},{"type":"block","id":"AYfm-1710294724162","name":"paragraph","data":{"style":{"textIndent":28}},"nodes":[{"type":"text","id":"KRwf-1710294724161","leaves":[{"text":"总结,从数据来看,STM32U5A5的低功耗模式下电流是很小的,在一些应用上可以做到很省电,不得不说,国内还没有哪家可以做到这么低了。","marks":[]}]}],"state":{}}]">
<p>这期主要了解一下STM32实现超低功耗的机制以及实测一下STM32U5各种低功耗模式低功耗数据。</p>
<p>一、STM32U5A5官方功耗数据</p>
<p> STM32U5A5是一款超低功耗的Cortex-M33内核的MCU,属于STM32U5系列;STM32U5系列是新一代超低功耗MCU,并且也是设计最为复杂的低功耗MCU。</p>
<p>官方给出的功耗数据如图:停止模式都在微安级别;待机和关断模式都达到了nA级别;</p>
<p> </p>
<p>二、STM32U5系列实现超功耗的原因</p>
<p> 1、支持SMPS;</p>
<p> STM32U5系列MCU支持在运行和低功耗模式下使用内部 SMPS,从而能够设计出非常高效的低功耗应用。注意带有“Q”后缀的 STM32U5系列器件(例如 STM32U5xxxxQ),低功耗设计可应用于工业智能流量计、健康及健身类穿戴产品、医疗监护设备、POS支付终端等对于功耗和安全性同时有高要求的场景。</p>
<p> 2、40nm先进工艺</p>
<p> 我们知道越先进的工艺代表着功耗性能越好,之前的STM32采用90nm工艺制程,而STM32U5采用更先进40nm工艺,那功耗必然会降低,并同时改善了漏电流和动态电流。</p>
<p> 3、优化功耗管理</p>
<p> STM32U5改善了功耗管理模式,增加了低功耗后台自主模式(LPBAM,Low Power Background Autonomous Mode),和一些可以在低功耗下运行的外设和功能。STM32U5中有16kB SRAM作为低功耗后台的自主模式的存储空间,可以在CPU休眠的情况下,将I2C、SPI、串口、ADC等外设数据通过LPDMA传送至其中,然后当数据累积到一定数量时再唤醒CPU进行一次性批处理。通过避免频繁唤醒CPU,从而达到节省功耗的目的。</p>
<p> 4、集成了高频率的DC/DC以及LDO。</p>
<p> 通过集成高频率DC/DC,可减少VDD至内核供电的转换损耗,实现最优化的动态功耗和最快速的动态响应。而通过LDO,则可解决DC/DC启动时间较慢的弊端</p>
<p> 5、分区FLASH和SRAM</p>
<p> 类似LPRAM,提供分区的FLASH和SRAM,用户可以根据应用场景,将不常用的Flash关闭并按需开启,又或者通过降低FLASH读取速度降低功耗</p>
<p>三、低功耗模式有哪些</p>
<p> 1、睡眠模式</p>
<p> CPU 时钟关闭,包括 Cortex-M33 内核(例如 NVIC、SysTick 等)在内的所有外设都可以运行,并在发生中断或事件时唤醒 CPU。</p>
<p> 2、停机模式</p>
<p> 停机模式基于 Cortex-M33 深度睡眠模式与外设时钟门控的组合。核心域中的所有时钟均停止。禁用 PLL、MSIS、MSIK、HSI16 和 HSE 振荡器,如果外设请求,则可以在停机 0、停机 1、或停机 2 模式下启用 MSIS、MSIK、HSI16。</p>
<p> 低功耗后台自主模式(LPBAM)</p>
<p> 一些外设是自主的,可以在需要时通过请求其内核时钟(最高 24MHz 的 MSIK,或 HSI16)及其总线(APB 或AHB)而在停机 0、停机 1、或停机 2 模式下运行,以便与 DMA(GPDMA1 或 LPDMA1,取决于外设和功耗模式)传输数据。</p>
<p> 3、 待机模式</p>
<p> 待机模式实现在保留欠压复位功能时的最低功耗:关闭内部调压器,从而关闭核心域。PLL、MSI(MSIS 和MSIK)RC、HSI16 RC 和 HSE 晶振也会关闭。RTC 可保持激活状态。可选择保留 8、56 或 64 KB 的 SRAM2。可以施加内部上拉或下拉来保持 I/O 电平。唤醒后的系统时钟为 MSIS,最高 4MHz。</p>
<p> 4、关断模式</p>
<p> 关断模式下功耗达到最低。该模式基于深度睡眠模式,其中调压器被禁用。因此核心域断电。通过关闭内部稳压器,以及禁用耗电监控,该模式可实现最低电流消耗。借助某一个(共五个)唤醒引脚或复位引脚,能够从该模式唤醒。由低速外部振荡器(LSE)定时的 RTC 在此模式下也是起作用的,具有唤醒功能模式。</p>
<p>四、实测功耗数据</p>
<p> 1、配置工程</p>
<p> 1)直接使用STM32CubeMX根据板子创建工程</p>
<p> </p>
<p> 2)不配置外设</p>
<p> </p>
<p> 最后产生工程即可</p>
<p> 3)在main函数里面添加如下代码</p>
<pre>
<code>HAL_Delay(5000);
//HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
//HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);
//HAL_PWREx_EnterSTOP1Mode(PWR_STOPENTRY_WFI);
//HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
//HAL_PWREx_EnterSTOP3Mode(PWR_STOPENTRY_WFI);
//HAL_PWR_EnterSTANDBYMode();
//HAL_PWREx_EnterSHUTDOWNMode();</code></pre>
<p>2、实测数据</p>
<p>默认时钟频率是16M</p>
<p> </p>
<p>1)运行模式</p>
<p>16MHz运行模式 2.1mA;</p>
<p> </p>
<p>160MHz 运行模式 7.4mA</p>
<p> </p>
<p>2)休眠模式 1.9mA 和16M的运行模式差不多</p>
<p> </p>
<p>3)停止模式</p>
<p>模式0和模式1功耗一致: 49.4uA;</p>
<p> </p>
<p>模式2::20.5uA;</p>
<p> </p>
<p>模式3:7.2uA;</p>
<p> </p>
<p>4)待机模式 0.6uA</p>
<p> </p>
<p>5)关断模式 0.5uA</p>
<p> </p>
<p>总结,从数据来看,STM32U5A5的低功耗模式下电流是很小的,在一些应用上可以做到很省电,不得不说,国内还没有哪家可以做到这么低了。</p>
<p>工程文件:</p>
<div></div>
</article>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p>全是英文完全看不懂版主厉害</p>
<p>要是可以吧英文知识复制到我大脑就好了</p>
小生意 发表于 2024-3-13 11:20
全是英文完全看不懂版主厉害
要是可以吧英文知识复制到我大脑就好了
<p>借助翻译软件,基本上还是可以看懂的</p>
页:
[1]