1. About this Development Manual

This user manual refers to special procedures and facts related to DMCP development and testing.

2. General Information

There are two version of DMCP:

DMCP

Original version of OS for DM42 based hardware

Basic projects:

DMCP5

Newer version of OS for DM32 based hardware (still in development)

Basic projects:

3. System key table

System key table is used to map hardware layout of keys to independent codes to ensure DMCP is able to directly use keys (like numbers, arrows etc.).

Keyboard routines are thus extended to read keys by codes or row/col placements.

3.1. Update

DMCP5 doesn’t require exact keymap.bin filename. Every file matching pattern keymap*.bin will be accepted.
  • Copy keymap.bin to root directory of calc flash disk

  • Keymap is automatically installed after ejecting the calc disk from PC

3.2. Recovery to required keymap

This method uses only bottom right key ([+] on DM42) to enter MSC mode. So, no other keys are needed.

  • Press RESET++|85 which unconditionally enters MSC mode

  • Copy keymap.bin to root directory of calc flash disk

  • Keymap is automatically installed after ejecting the calc disk from PC and calculator is RESET.

3.3. Creating new keymap

It has following contents:

keymap_utils/bin/keymap2layout
keymap_utils/bin/mk_keymap
keymap_utils/keymaps/base/keymap.txt
keymap_utils/keymaps/empty/keymap.bin

The file keymap_utils/keymaps/empty/keymap.bin is empty keymap for recovery of original (i.e. DM42) settings.

Use following steps to create new keymap.bin file:

  1. Take keymap_utils/keymaps/base/keymap.txt and and swap positions of key codes in this file

  2. Check the layout by running

    keymap2layout keymap.txt

    which should display the layout in terms of original key names.

  3. Generate new keymap.bin using

    mk_keymap <KEYID> keymap.txt

    where <KEYID> is short keymap identifier (max 8 chars).

3.4. "Incompatible Program" Message

Message like:

incomp pgm screen

indicates that currently installed keymap differs from one requested by program (here SDKdemo).

Define PROGRAM_KEYMAP_ID in src/main.h to indicate required keymap, it should contain 32bit value representing first four characters of <KEYID> mentioned earlier, e.g.

#define PROGRAM_KEYMAP_ID 0x32334d44

for DM32 keymap.

4. Special RESET key combinations

This chapter describes special actions invoked when some keys are pressed during calc reset.

xx

Means xx key under current system key table

xx|RC

Means key at row=R, col=C, and xx shows what key is at that RC position on original DM42 keyboard, e.g. F1|11, F6|16

Table 1. RESET keys
Keys Handles Action Note

RESET+

PGM

Clean Reset

DM42 doesn’t load calculator state starting with 'Memory Clear' message

RESET+F1|11

DMCP

DMCP Menu

Jump to DMCP menu instead of starting program

RESET+F6|16

DMCP

Production diagnostics screen

Jump directly to keyboard test of diagnostics screen. Use EXIT|81+F6|16 to leave keyboard test and enter diagnostics menu.

RESET++|85

DMCP

MSC Mode

Jump directly to USB MSC mode. After ending MSC mode by PC usual check for fw and keymap update is done. Then the calc is RESET.

5. QSPI usage considerations

QSPI layout
0x000000 \
 ..      _ Available for program data
0x1fc000 \
 ..      _  System tables
0x200000 \
 ..      _ FAT disk sectors
0x800000
Keep in mind that QSPI flash is shared with FAT disk and is reprogrammed to command mode during disk writes.
  • QSPI is configured in memory-mapped mode during normal operation and filesystem read operations

  • QSPI is reconfigured to command mode for writes

  • QSPI is in low power sleep when the calculator is turned off.

STM is known for unreliable implementation of SPI flash interface,
see Errata Sheet for known problems (STM32U575 Documentation).
Expect difficulties when trying to run code from flash or with high data access rates.