Miniminutnik (SW)

Overview

Name Miniminutnik
SW-Revision v3.1.1
Binaries Link
older
Changelog Link
Docu 20220606
Target MCU stm32l011f4, stm32l031f6

“Miniminutnik” is an small egg timer. It is capable to handle up to 5 independent timers in parallel.

Usage

By pressing the button an “cursor” can be moved among the slots/LEDs. When it rests on a LED for some seconds, the corresponding slot gets activated and the LED starts blinking. Furhter timers can be sctivated by pressing the button accordingly. An single slot can not be started multiple times.

Flash firmware to device

Via Openocd/GDB

To be able to flash the device via openocd/gdb following prerequisite are required:

Connect the device via STLink. AN NUC64Debug adapter can be used to work with an NUCLEO-64 board as STLink. Power on device an set it to an timer which lasts some time. Extract the archive and open an tetrminal in the subfolder

cd share
openocd -f ./openocd.conf

Use another terminal to flash device via gdb. The path of the binary may be absolute or relative to the work directory of the started openocd.

set arm abi AAPCS
target remote localhost:3333
monitor reset halt
monitor fast_load_image ../bin/miniminutnik.bin 0x20000000 bin
monitor fast_load
monitor reset halt

Via UART-Bootloader (serial interface)

Read hardware documentation about how to enter the STM32 ROM bootloader.

Note: for STM32L0 devices at least stm32flash 0.6.0 is needed. Some GNU/Linux distributions may have patched older versions.

Note: take care that no terminal application acccessing the UART is running

This example assumes that the device appears at “/dev/ttyACM0” on the host.

stty -F /dev/ttyACM0 57600
stm32flash -w miniminutnik.bin /dev/ttyACM0

Configuring

Serial interface

The device has an command prompt via serial UART interface. To connect the device to the host the virtual COM port of the NUCLEO-64 board can be used or it can be connected directly via “ophio” USB-UART adapter. The serial configuration of the device is “115200 8N1”. Power on device an set it to an timer which lasts some time. On linux host systems minicom can be used as terminal.

minicom -D /dev/ttyACM0 --color=on

Enter “admin” to login.

Commands

Command Description
help Show available commands
hwdata Show production data
config Show current configuration
config time [slot] [time] Set timer duation for slot [slot] to [time] seconds
config slots [slots] Set amount of slots to [slots]
config melody [melody] Set alarm melody to [melody]
config mode [mode] Set mode to [mode]
config reset Reset configuration to defaults

Modes

0: Regular egg timer

The slots can be used as described in usage.

1: “Corona”-mode

The “corona”-mode alternates between the first slots for a work day. It indicates when to open/close the window for ventilation according to given regulations.

Note: Only available on devices with flash size >= 32KB, e.g. STM32L031xx

Melodies

Bugs and development

Please report bugs via issues tracker at this link or contact me via mail to campo@minutnik.net