This is a simple test program for experimenting with and verifying power management on STM32L0 boards.
This program requires the Catena-Arduino-Platform (and the associated libraries).
It's easier to do testing on the Catena 4801.
-
Attach an ST-LINK-2 to the SWD pins of the 4801 using jumpers.
4801 Pin Label ST-Link Pin JP1-1 +VDD 1 JP1-2 GND 3 JP1-3 SWDCLK 9 JP1-4 SWDIO 7 JP1-5 nRST 15 Note that these are almost linear; only 9 and 7 on the ST-Link are swapped.
-
Attach an Adafruit FT232H USB to TTL serial adapter.
4801 Pin Label FT232H JP4-2 D0 D0 JP4-3 D1 D1 -
Connect the serial adapter to PC via USB. Ensure (in device manager) that the FTDI driver is creating a COM port. Use TeraTerm and open the COM port. In Setup>Serial, set speed to 115200. In
Setup>Terminal
:- Set
New-line Receive:
toLF
, - Set
New-line Transmit:
toCR+LF
, - Make sure to check
Local echo
.
- Set
-
Attach power using a OTII box.
4801 Pin Label OTII Pin JP6-1 GND BLK JP6-2 +VDD RED -
Launch OTII software and set power to 3.3V, 200 mA limit.
Displays a terse list of commands.
Read and display one or more registers. The first argument is the base register address. If there's no second argument, then only one 32-bit word is read and displayed. Othersise, the second argument is the number of words to read and display.
Both base and length are given in hexadecimal.
This command uses the CatenaRTC::Sleep()
method to suspend the system. If an argument is provided, it gives the sleep time in seconds. Otherwise, the system sleeps for 5 seconds. The delay is given in decimal.
Not implemented.
Not implemented.
Write values to successive registers. The first argument is the base address, which must be 32-bit aligned. Subsequent arguments are taken as the 32-bit values to be written.
Both base and the values are given in hexadecimal.
These commands are supplied by the framework
Read and display the CPU ID.
Print the arguments to the consoles.
Dump FRAM. The first argument is the base, the second (if given) is the number of bytes to display. Both are given in hexadecimal.
If given with no arguments, the FRAM is reset in a non-desctructive way. If written as fram reset hard
, the FRAM is reinitialized by re-writing the header.
Set one of several system configuration parameters: syseui
, operatingflags
, or platformguid
.
Reset the system.
On uploading this power test sketch, we measured the sleep power of Catena 4801, 4618-M201, 4618, 4612 using OTII tool.
The average sleep power of Catena 4801 is ~6 uA. The below graph shows the sleep power with minimum, maximum and average values.
The average sleep power of Catena 4612 is ~17 uA. The below graph shows the sleep power with minimum, maximum and average values.
The average sleep power of Catena 4618 is ~20 uA. The below graph shows the sleep power with minimum, maximum and average values.
The average sleep power of Catena 4618-M201 is ~22 uA. The below graph shows the sleep power with minimum, maximum and average values.