About this user manual

This user manual refers to special features of DM42. Look at the following documentation for description of basic calculator functionality:

General Information

CPU speed

CPU speed is 24MHz when running on battery (due to limited battery current) and increases to 80MHz when the USB cable is connected.

Internal FAT disk

The calculator has 6MB of internal flash storage formatted as a FAT filesystem that is used for loading/saving programs and for backing up calculator state. It is accessible as USB disk when activated via the menu 'File > Activate USB Disk >'.

Internal flash has limited amount of write cycles. While the lifetime with ordinary usage could be dozens of years, an excessive number of writes will wear the flash memory much quicker.

Worst case scenario, you would have to replace the flash chip, which is worth less than $1. If needed, SwissMicros will replace the chip at no cost, but shipping costs must be covered by the customer.

The datasheet mentions a minimum of 100,000 write cycles, which sounds like a lot, but any change in the filesystem means overwriting at least part of the file allocation table, which is stored in a static location.

Calculator comes with pre-filled FAT disk contents. In case the contents of the FAT area is lost it could be always downloaded from the SwissMicros DM42 FAT files page. There is the contents of individual directories accessible separately or the whole contents of FAT disk can be downloaded as single zip file DM42.zip.

There are several directories with special names on the FAT disk:

HELP

Contains help file(s) for built-in DM42 help that can be activated from main system soft menu by pressing F1 key (leftmost in top row of keys).

OFFIMG

Bitmap files from this directory are displayed when the calculator is turned off. See OFF Images chapter for more details.

PROGRAMS

Raw files with programs are loaded/saved from/to this directory.

SCREENS

Screenshots of calculator LCD are saved into this directory. See LCD Screenshots for more details.

STATE

Calculator state files with extension .s42 are stored in this directory. See chapters Load State or Save State how the load or save calculator state.

Calculator Extensions

Virtual variables

Managing some of the new features specific to the DM42 is something that spurred a lot of discussion. Initially we wanted to re-purpose some of the so-called "reserved" flags of the HP-42S but it soon became apparent that others had already done so in various patches for Free42 and we wanted to avoid trampling on anybody’s toes with our own patches for Free42.

The next idea was to extend the number of flags available beyond 100 but obviously only have them accessible via indirect addressing as there was no question of patching Free42 to accept 3 digits in the various flag instructions. But then, how do we make integer values (and one real value) available to programs without assigning a whole block of flags that are going to be awkward to read?

After that we thought of using extended register numbers. They would either have to be assigned ridiculously high index numbers in order to avoid conflict if someone decided to go for a register array SIZE of 2000, or they would have to be assigned negative index numbers. We couldn’t use negative indexes because the HP-42S and Free42 just take the absolute value of the index and use that to access the correct register and some programs might rely on that.

We settled on the concept of "Virtual Variables". These are variables that do not (and cannot, for that matter) exist in the DM42’s variable table. Because of this, they are not listed in the variable menu when you press RCL or STO but there is a way to make them easy-ish to access, just read on…​

There are six such virtual variables:

"DevID"

Device ID (read-only) — RCL "DevID" returns the type of DM42 you’re using. There are currently two hardware models only identified by value 0 (zero) is returned by the DM42 units that we have. Other types of unit that may be produced in future will have different DevID values.

"GrMod"

Graphics Mode (read-write) — RCL "GrMod" retrieves the current graphics mode and STO "GrMod" sets the graphics mode to the number present in the X register. Graphics modes currently supported are:

  • 0 = standard HP-42S resolution 131x16

  • 1 = reserved for future use and maps to 0 on the DM42

  • 2 = DM42 full resolution 200x120

  • 3 = DM42 full resolution 400x240

"ResX" and "ResY"

X- and Y-resolution (read-only) — RCL "ResX" or RCL "ResY" recalls the current X-resolution or Y-resolution respectively into the X stack register. The values that you will get are 131, 200 or 400 for RCL "ResX" and 16, 120 or 240 for RCL "ResY" depending on the current graphics mode (0, 2 or 3).

"Vbat"

Battery voltage (read-only) — If you’re running off battery power then this will give you the voltage read at that precise moment in time. If you’re running on USB power then this will give you the last battery voltage that was recorded before connecting the USB cable. Note that the value retrieved here can and almost always will be different to the voltage displayed in the status bar. The latter is cached and almost always retrieved when the DM42 is idle. The voltage read from "Vbat" is the voltage read while you are using the keyboard and/or running a program. This can be useful for pausing lengthy processing if the battery voltage drops below a threshold and allowing it to recover before resuming.

"RefLCD"

The purpose of programs can vary significantly. There are programs like a stopwatch or games, where quick refreshing of the LCD is required. On the other end of the spectrum are pure computational programs, where no LCD output is required throughout program execution and where it is more beneficial to utilize all the CPU time for computation rather than wasting it on unnecessary LCD updates. The "RefLCD" virtual variable was introduced specifically to address those different requirements. It is possible to disable LCD refreshing altogether or to enable the periodic refresh of individual portions of the LCD.

RefLCD in more detail

It is possible to disable LCD refreshing altogether or to enable the periodic refresh of individual portions of the LCD. The value that you store in this variable is in fact a bitmask as per the table below. Items whose corresponding bit is cleared are not refreshed whereas those whose bit is set are refreshed with 200ms timeout after the LCD contents changes.

Bit Value Zone

0

1

Main area (stack/graphics)

1

2

Goose

2

4

Annunciators

In order to prevent any part of the LCD from refreshing and thus maximize performance, store the value 0 (zero) in "RefLCD". Storing 1 in the variable means that the main area will be updated with 200ms timeout (stack or the graphics display if that is what is active). 2 will allow the goose to fly and 4 will allow the annunciators (including the flag tiles) to be updated. To have more than one zone refreshed during program execution, store the sum of the bit value(s) in "RefLCD" as follows:

Value Binary Zone(s)

0

000

None (no refreshing occurs)

1

001

Main area

2

010

Goose

3

011

Main area and goose

4

100

Annunciators

5

101

Annunciators and main area

6

110

Annunciators and goose

7

111

Annunciators, goose and main area (everything)

You can, however, still refresh zones on an ad hoc basis even when they don’t normally refresh by storing the negative value of the bitmask value in "RefLCD". For example, to update the annunciators programatically "now", store -4 to "RefLCD".

One exception to this is the message area in which VIEW and AVIEW show their results. This is never disabled and is repainted with 200ms delay(if needed) even if zero is stored in "RefLCD". If the redraw response isn’t fast enough (e.g. for a stopwatch application, see below) then you can have the message area refreshed by program by storing the value -8 in "RefLCD". This program shows an example of how to use it:

00 { 49-Byte Prgm }
01▸LBL "STOPW"
02 TIME
03 →HR
04 STO 02
05 "RefLCD"
06 ASTO 03
07 CLX
08 STO IND 03 @ Disable refreshing
09 FIX 02
10▸LBL 00
11 TIME
12 →HR
13 RCL- 02
14 3600
15 ×
16 VIEW ST X
17 -8
18 STO IND 03 @ refresh the message area now
19 GTO 00

Accessing virtual variables

Attempting to STO a value in a read-only virtual variable has no effect, so it is not possible to create these variables in the variables table within Free42. Because of this it is a bit awkward to RCL and STO them directly. We recommend adding a reference to the virtual variables that you will need in your program in order to access the variables indirectly later on. Something like this:

"GrMod"
ASTO 10
"ResX"
ASTO 11
"ResY"
ASTO 12

Where needed you can then simply address the virtual variables this way:

3
STO IND 10
"Pixels on "
├"screen: "
RCL IND 11
RCLx IND 12
ARCL ST X
AVIEW
STOP

F-Buttons

The top row of keyboard consists of six unprinted buttons referenced as F-Buttons (F1-F6) or Soft-Menu Buttons. When no calculator menu is in action those buttons have following functions:

F1

Displays the Help. Note that the /HELP/index.htm file has to be present. The latest version can be downloaded from the DM42 help page.

F2

Toggle this system soft menu visibility.

F3

(not assigned)

F4

Increase buzzer volume

SHIFT-F4

Decrease buzzer volume

F5

Toggle stack alignment (Left, Right, Right Underlined)

SHIFT-F5

Toggle between sans and HP font

F6

Increase font size

SHIFT-F6

Decrease font size

LCD Screenshots

Hold SHIFT and press DISP to get a screenshot.

You will find a .bmp file named according to the current time and date in the /SCREENS folder of the FAT drive.

OFF Images

The LCD display used in DM42 calculator behaves in similar way as e-ink displays and contents of the LCD is visible for a long time after the calculator is turned OFF.

This feature is used to display images when the calculator is turned OFF.

Single hard-coded OFF image is present in calculator firmware and this image is displayed whenever the calculator is turned OFF and FAT disk doesn’t contain any valid custom image or the FAT disk is in error state.

Custom OFF images should be stored in /OFFIMG/ directory. All valid images are then cyclically displayed one after each calculator OFF in the order how they appear in /OFFIMG/ directory.

OFF images require specific image format. It has to be .bmp file with dimensions 400 x 240 and 1 bit depth.

Examples of OFF images can be found on "A collection of off-screen images" page.

PIXEL and AGRAPH

PIXEL and AGRAPH are not limited to the original HP-42S’s resolution of 131x16 pixels. The compatibility with negative values to display lines and with complex numbers and matrices is conserved. You can now use horizontal values of 1≤X≤200 and vertical values of 1≤Y≤120 in 200x120 mode, or 1≤X≤400 and 1≤Y≤240 in 400x240 mode. Switching between 131x16, 200x120 and 400x240 modes is achieved using the GrMod virtual variable and current graphics resolution could be probed by ResX and ResY.

Alpha Input Mode

Upon entering Alpha input mode you will see a new annunciator on the screen:

  • "[  ]" denotes original HP-42S input mode. This is the mode that Alpha input starts with when entered for the first time.

  • "[a]" denotes lower case DM42 input mode.

  • "[A]" denotes upper case DM42 input mode.

SHIFT followed by and allow you to cycle through the modes.

The DM42 remembers which mode you were in last time alpha input was active and upon entering alpha input modes switches immediately to that mode.

Original HP-42S mode
  • Function keys work as expected for standard characters.

  • ASTO (STO) and ARCL (RCL) work as expected.

  • "%", "pi" and "E" work as expected.

  • SHIFT SHOW works as expected.

  • Local labels LBL 01, LBL A and LBL a work as expected.

  • Global labels LBL "ABC", LBL "123" and LBL "A123" work as expected.

  • Un-shifted [R/S] works as expected and [SHIFT] [R/S] enters/leaves Prgm mode as expected.

Lower and upper case DM42 modes
  • The function keys still allow input in HP-42S mode.

  • All alpha keys A-Z give the expected characters.

  • SHIFT A to SHIFT O give the same characters.

  • SHIFT 0 (zero) to SHIFT 9 give the digits 0-9 instead of the alpha characters.

  • Shifted ÷, ×, - and + give '÷', '×', '-' and '+' instead of the alpha characters.

  • Shifted R/S gives '?' instead of entering/leaving Prgm mode.

  • ASTO, ARCL, '%', 'pi' and 'E' (exponent) are not available. Switch to standard HP-42S mode to get them.

  • SHIFT SHOW is not available. Use standard HP-42S mode.

  • Two-digit local labels LBL 01 are not available. Use standard HP-42S mode.

  • Local labels LBL A and LBL a and global labels LBL "ABC", LBL "123" and LBL "A123" work as expected.

  • Un-shifted R/S still behaves as usual allowing program execution to resume after inputting alpha data to a program.

  • Function arguments (eg. STO* "h") work as expected

SST/BST in alpha input mode

Press and hold the SHIFT key while pressing or in order to execute BST or SST respectively when in alpha input mode. As on the original HP-42S, BST will start auto-repeating after a while and SST will NULL after a couple of seconds if you press and hold or respectively.

DM42 Menus

Menu navigation:

  • Select menu items using , keys.

  • Activate current menu item by pressing ENTER key or by pressing the number key corresponding to particular menu line.

  • Return to previous menu level by EXIT key

Main Setup menu

Main 'Setup menu' could be entered by pressing SHIFT+SETUP.

From there other sub-menus could be entered or about screen displayed

  1. File menu

  2. Calc. State menu

  3. Settings menu

  4. System menu

  5. About > Displays About screen.

File menu

1. Load Program >

Used for loading the *.raw programs stored in the /PROGRAMS/ directory of the flash storage.

It should display all *.raw files from /PROGRAMS/ directory in alphabetical order.

To load program

  • Select the program to load using the and keys

  • ENTER to load the selected program

Loading info flashes for a second until the program is loaded into calculator memory.

Then the program list is displayed again. You can load next program or leave the menu by EXIT key.

2. Save Program >

Used for saving one or more program(s) from the calculator memory to a *.raw file in the /PROGRAMS/ directory of the flash storage.

  • Select the program or programs to save, confirm with ENTER

  • Choose existing filename as target or type new target filename, confirm with ENTER

3. Activate USB Disk >

Used to copy files from/to a host computer - e.g. backup/restore the calculator state files from /STATE/ directory or read/write programs in RAW format into /PROGRAMS/ directory.

  • Connect the calculator to a computer using a USB cable

  • The DM42’s flash disk should be visible on the computer

  • Read/write files

  • 'Eject device' on the host machine.

  • Calculator should end USB disk mode automatically if correctly ejected by OS. You can end USB disk mode by pressing EXIT key on the calculator but be sure all data are flushed to disk first.

The last two points 'Eject device' and 'Press EXIT key on calculator' (if it doesn’t end automatically) are important to avoid unsaved data and possible FAT disk corruption!
Note that calculator programs must be stored in the /PROGRAMS/ directory of the flash storage to be accessible from the calculator menu.

4. Show Disk Info >

Displays disk status and disk block info.

Calculator State menu

The calculator reads last used state file after a hardware RESET (i.e. after pressing the [RESET] on the back of the calculator).

Reading of last stored calculator state file can be bypassed (eg. when the FAT disk is corrupted and the calculator hangs after a reset while reading the state file) by holding the - key and pressing the [RESET] button on the back of the calculator.

1. Load State

Displays list of available calculator state files (.s42 extension) from /STATE/ directory.

To load calculator state file:

  • Select particular file and press ENTER to load the state file.

  • Confirmation dialog appears and you have to acknowledge you want to abandon current calculator state.

If confirmed, calculator is restarted and selected calculator state file loaded.

2. Save State

Used for saving current calculator state to a *.s42 file into the /STATE/ directory of the flash storage.

To save state file: - Select existing filename as target or type new target filename, confirm with ENTER - Confirmation dialog can appears if existing file is about to be overwritten

If confirmed, calculator state is saved and subsequently is the calculator restarted and the calculator state file reloaded.

3. Load Clean State

Restarts the calculator without reading the state file (same as [RESET] + -).

Settings menu

1. Set Time >

Used for setting the time.

  • Use the function keys to adjust the time.

  • Press Set to write the new time to the calculator clock or EXIT to cancel your changes.

2. Set Date >

Used for setting the date.

  • Use the function keys to adjust the date.

  • Press [Set] to write the new date to the calculator clock or EXIT to cancel your changes.

3. Status Bar >

Displays filed selector for what should be displayed in calculator top status bar:

Status Bar menu
1. State Filename
2. Day of Week
3. Date
4. Date Separator
5. Month Shortcut
6. Time
7. Power Voltage in Header

Fields are always displayed in order how they appear in this menu.

4. Beep Mute

Selecting this menu item toggles the 'Beep Mute' flag.

When the 'Beep Mute' flag is active, no sounds are produced by the calculator.

Note that this value is stored in the calculator state file.

5. Slow Auto-repeat

Selecting this menu item toggles the 'Slow Auto-repeat' flag.

When the 'Slow Auto-repeat' flag is active auto-repeat delays are prolonged.

Note that this value is stored in the calculator state file.

6. Stack Layout

Enters stack layout selector where one of following layouts could be selected

Stack Layout menu
1. XYZTL
2. XYZTA
3. XYZT
4. XYL
5. XYA
6. XY

System menu

1. Bootloader

Activates bootloader mode for firmware flashing.

You can flash DM42 firmware once is the bootloader mode entered.

Press the RESET button on the back of the calculator if you activate Bootloader mode accidentally.

2. Diagnostics

Diagnostic screen for factory checking and troubleshooting.

3. Format FAT Disk >

Format the internal FAT disk storage. All data is erased.

4. FAT Disk Media Test >

Checks whole flash disk FAT area for bad blocks. Disk is formatted starting from first good block after the check.

All data is erased from disk.

5. Self Test

Displays production test menu where tests of various parts of calculator could be run from.

Self Test menu
1. KBD Test
2. LCD Test
3. IR Test
4. BEEP Test

Firmware Update

Latest firmware is available at https://www.swissmicros.com/dm42/firmware/

DM42 has two firmware areas. First one is the main flash area which is updated with each firmware update, the second one is auxiliary QSPI area which is rarely updated and special update menu appears when the firmware needs new QSPI contents.

No action related to QSPI contents is needed until firmware requests QSPI update by showing "QSPI Load" menu.

The preferred update method is using internal FAT disk which is available since firmware version 3.5.

This method is implemented in main firmware, so it could be unavailable if the firmware is corrupted. Then other method of update based on internal CPU flashing routine could be used. This method requires the calc to be switched in so called 'Bootloader mode'.

The internal bootloader exposes standard DFU interface and can be programed by any DFU programming software with limitation that firmware is plain binary file not file in general .dfu format, so the programming software has to support it.

This section describes how to update firmware using FAT disk or using bootloader mode with two utilities GUI based dm_tool and command line based dfu-util.

Availability of the particular update method on mainstream operating systems outlines following table:

FAT disk dm_tool dfu-util

Windows

X

X

X

Linux i686

X

X

X

Linux x86_64

X

X

X

macOS

X

X

macOS users can get dfu-util via Homebrew

FW Update from FAT disk

Copy firmware file (like DM42_flash_3.5.bin) to the root of internal FAT disk.

Start flashing from the main Setup menu: System > Flash firmware from FAT.

Bootloader mode activation

Bootloader mode can be activated from main Setup menu: System > Bootloader or by resetting the calculator using RESET button while PGM button is pressed too.

To be more precise, the sequence of entering bootloader mode using RESET and PGM button is: - press and hold PGM button - press and release the RESET button - release the PGM button

Older models have both buttons accessible through the holes in the calculator backplate. Newer models have hole in the backplate for RESET button only, therefore the backplate should be removed first, then use the RESET and PGM buttons directly on PCB.

FW Update Using dm_tool

Prerequisites in Windows

You have to install libusb driver as described here: http://www.swissmicros.com/doc/libusb_install/libusb_install.html.

Prerequisites in Linux

USB device access rights

You can allow access to the DFU device for users in plugdev group by running as root:

cd /etc/udev/rules.d/
cat << OI > 49-stm32-dfuse.rules
# This is udev rules file (place in /etc/udev/rules.d)
# Makes STM32 DfuSe device accessible to the "plugdev" group

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="664", GROUP="plugdev"
OI
udevadm control --reload-rules

Alternatively you can use dfu-util as root or prefix the commands with sudo, e.g.

sudo dfu-util -l

Launching dm_tool

Switch the calculator to bootloader mode

From menu or by RESET+PGM buttons (see Bootloader mode activation).

Connect the calculator to the PC

Be sure the libusb driver is installed if used in Windows (http://www.swissmicros.com/doc/libusb_install/libusb_install.html).

Launch dm_tool

It can be launched by clicking on the exe file or from command line with firmware filename as argument.

If everything works well and the calculator was connected before launching dm_tool, then the message at the right side of [Program] button should show device number. If it shows "No DFU capable devices found (Click to refresh)" try to click at the message and it should display the ID of connected device after refresh and

Memory layout:
    0x8000000-0x80fffff:  size 1024kB = 512*2kB pages

in the text area.

If the message "No DFU capable devices found" still remains there something is wrong with libusb driver installation or connection to the calculator or the calculator isn’t in bootloader mode.

Finally use [Program] button to flash new firmware.

FW Update Using dfu-util

Switch the calculator to bootloader mode

From menu or by RESET+PGM buttons (see Bootloader mode activation).

Connect the calculator to the PC

You can list information about connected DFU device using dfu-util -l

then start flashing using

dfu-util -D DM42_flash.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000

If you have connected more devices with DFU interface or if dfu-util isn’t able to detect the device, you can specify the USB device ID on command line using -d option:

dfu-util -D DM42_flash.bin -d 0483:df11 -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000

Please, be patient, it takes some time.

Press RESET button after dfu-util finishes the flashing.

Example output of dfu-util

$ dfu-util -D build/DM42_flash.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 756288
Download	[=========================] 100%       756288 bytes
Download done.
File downloaded successfully

real	1m55.929s
user	0m0.044s
sys	0m0.048s

Example output of dfu-util -l:

$ dfu-util -l
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [0483:df11] ver=2200, devnum=46, cfg=1, intf=0, path="3-7", alt=2, name="@OTP Memory /0x1FFF7000/01*0001Ke", serial="205734813133"
Found DFU: [0483:df11] ver=2200, devnum=46, cfg=1, intf=0, path="3-7", alt=1, name="@Option Bytes  /0x1FFF7800/01*040 e/0x1FFFF800/01*040 e", serial="205734813133"
Found DFU: [0483:df11] ver=2200, devnum=46, cfg=1, intf=0, path="3-7", alt=0, name="@Internal Flash  /0x08000000/512*0002Kg", serial="205734813133"

QSPI flashing

General information

While the contents of main flash changes with each firmware version. The QSPI contents is usually preserved and it will be explicitly noted in release notes when the QSPI contents changes.

Moreover, there is built-in QSPI loader available since the firmware version 2.10.13. Calculator makes checksum of expected QSPI contents after RESET. If this check fails "QSPI Load" menu is activated.

No action related to QSPI contents is needed until firmware requests QSPI update by showing "QSPI Load" menu.

The prefered option for QSPI update is to use "QSPI Load" menu to copy firmware to the calculator filesystem and flash the QSPI contents from the file.

User can also switch the calculator into bootloader mode and then use dfu-util or dm_tool (obsolete) described below.

Flashing QSPI from FAT disk

Activate USB disk from the "QSPI Load" menu and copy DM42_qspi_xxx.bin firmware to calculator root directory.

The copy operation takes some time. Be sure you use 'Eject device' or 'Safely remove device' or whatever other means the filesystem uses to ensure all data are written to device before disconnecting!

Then use 2. Load QSPI from FAT command to download the firmware to QSPI.

Firmware file is deleted from the filesystem after successful download to QSPI.

Flashing QSPI using dm_tool (obsolete)

Note that this method is obsolete and will be removed.

The dm_tool takes care about QSPI loader itself. Thus flashing new QSPI contents is as easy as flashing QSPI and ordinary flash contents in a row:

  1. Flash DM42_qspi_xxx.bin

  2. Flash DM42_flash_xxx.bin

The second step is important as the ordinary firmware is replaced by QSPI loader in first step.

See Launching dm_tool for details about flashing using dm_tool.

Flashing QSPI using dfu-util

Download QSPI loader firmware DMflash.bin

Get DMflash.bin from the url http://www.swissmicros.com/tools/DMflash.bin.

Switch the calculator into bootloader mode

From menu or by RESET+PGM buttons (see Bootloader mode activation).

Flash QSPI bootloader

dfu-util -D DMflash.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000

Press RESET button after dfu-util finishes the flashing.

Flash QSPI contents

dfu-util -D DM42_qspi_2.10.12.bin -a "@QSPI Flash   /0x90000000/512*04Kg" -s 0x90000000

Press F (top right key) to switch the calculator back to bootloader mode.

Flash main firmware

dfu-util -D DM42_flash_2.10.12.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000

Press RESET button after dfu-util finishes the flashing.

Note that this step is important as the ordinary firmware is replaced by QSPI loader earlier.

QSPI Load menu

This menu is displayed only when the calculator detects invalid contents of QSPI firmware area.

1. Bootloader

Activates bootloader mode for firmware flashing.

Press the RESET button on the back of the calculator if you activate Bootloader mode accidentally.

2. Load QSPI from FAT

Starts flashing of the QSPI firmware. The firmware DM42_qspi_xxx.bin is expected to be stored in the FAT filesystem root directory.

3. Activate USB Disk >

Used to copy files from/to a host computer.

  • Connect the calculator to a computer using a USB cable

  • The DM42’s flash disk should be visible on the computer

  • Read/write files

  • 'Eject device' on the host machine.

  • Calculator should end USB disk mode automatically if correctly ejected by OS. You can end USB disk mode by pressing EXIT key on the calculator but be sure all data are flushed to disk first.

The last two points 'Eject device' and 'Press EXIT key on calculator' (if it doesn’t end automatically) are important to avoid unsaved data and possible FAT disk corruption!

4. Format FAT Disk >

Format the internal FAT disk storage. All data is erased.

5. FAT Disk Media Test >

Checks whole flash disk FAT area for bad blocks. Disk is formatted starting from first good block after the check.

All data is erased from disk.

6. Show Disk Info >

Displays disk status and disk block info.