2020-07-13 05:57 PM
I used X-NUCLEO-LPM01A, STM32 Power shield to measure power consumption of STM32L432KC and got ULPbench score 0.04 which seems extremely low. Normally, according to the examples I saw, the score should be above 100. All my STM32 board is doing is a simple for-loop doing nothing and testing the execution time and a blinking LED. I don't know why the score is low and I am worried that there is something wrong with connection or anything else.
2020-07-14 05:56 AM
ULPMark is a program, provided by the EEMBC. I'm pretty sure it neither spins in a do-nothing for-loop nor blinks an LED -- rather it probably spends as much time as it can sleeping.
Last I heard the ULPMark source was only available to licensees (which I am not -- no funding). But even disabling the LED will probably get you a better score with your program.
2020-07-14 06:04 AM
Tight hard loops consume a lot more power than you'd imagine.
Use interrupts to count off delay times, and loop with a __WFI
2020-07-15 11:21 PM
Many thanks to @Community member and @mckenney .
According to this user manual: https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/cc/53/da/bf/54/f4/48/ee/DM00418905/files/DM00418905.pdf/jcr:content/translations/en.DM00418905.pdf to get ULPbench score, Prerequisite: board target must run an ULP bench compliant program. (page 15)