Table of Contents
- Description
- Available registers
- Registers details
- REG_ID_TYP - 8b - RO
- REG_ID_VER - 8b - RO - official
- REG_ID_SYS_CFG - 8b - RW - official
- REG_ID_INT - 8b - RW - official
- REG_ID_KEY - official (untouched)
- REG_ID_BKL - official (untouched)
- REG_ID_DEB - official (untouched)
- REG_ID_FRQ - official (untouched)
- REG_ID_RST - 8b - RW - official
- REG_ID_FIF - official (untouched)
- REG_ID_BK2 - official (untouched)
- REG_ID_BAT - official (untouched)
- REG_ID_C64_MTX - official (untouched)
- REG_ID_C64_JS - official (untouched)
- REG_ID_OFF - 8b - RW - official
- REG_ID_INT_CFG - 8b - RW
- REG_ID_RTC_CFG - RW (WIP)
- REG_ID_RTC_DATE - 32b - RW
- REG_ID_RTC_TIME - 32b - RW
- REG_ID_RTC_ALARM_DATE - 32b - RW
- REG_ID_RTC_ALARM_TIME - 32b - RW
Description
There is two types of registers that can be accessed: read only (RO) and read write (RW) register. Trying to write in a RO register doesn't modify value of the register.
For the sake of clarity, I will only detail the registers that have been added or modified by this firmware.
Available registers
Registers details
REG_ID_TYP - 8b - RO
[7..0]: Firmware ID, 0xCA on this version, 0x00 for the official firmware.
Can be used by the Pico software to identify which BIOS type is running on the PicoCalc.
REG_ID_VER - 8b - RO - official
[7..4]: Version major
[3..0]: Version minor
REG_ID_SYS_CFG - 8b - RW - official
Internal system configuration.
[0]: Overflow enable, allow the keyboard FIFO to be override when overflow occurs. (0: default)
[2..1]: Reset delay, configure the delay between Pico power off and on during reset. Possible values:
0 => 200 ms
1 => 1 s (default)
2 => 3 s
3 => 5 s
[5..3]: reserved
[6]: Report key mods, modifiers keys (shift, alt, ...) are reported like normal keys
[7]: Use key mods, modifiers keys (shift, alt, ...) can modify the key pressed
REG_ID_INT - 8b - RW - official
When an interrupt is triggered at least one time, the corresponding flag is set in this register.
The written bits clear the the flags (write 0xFF to clear all).
Accessing the register, both read or write, assert the PICO_IRQ pin signal.
[7..6]: Reserved
[0]: Overflow
[1]: Capslock
[2]: Numlock
[3]: Key
[4]: RTC
[5]: Power button
REG_ID_KEY - official (untouched)
REG_ID_BKL - official (untouched)
REG_ID_DEB - official (untouched)
REG_ID_FRQ - official (untouched)
REG_ID_RST - 8b - RW - official
Request a reset. Need to select the reset type between full (pico+STM32) and pico only.
Be aware that resetting the STM32 will reset the RTC too!
You can provide a value to delay the execution of reset.
[5..0]: Reserved
[6]: Set to 1 to trigger a pico reset. Priority over full reset.
[7]: Set to 1 to trigger a full reset.
REG_ID_FIF - official (untouched)
REG_ID_BK2 - official (untouched)
REG_ID_BAT - official (untouched)
REG_ID_C64_MTX - official (untouched)
REG_ID_C64_JS - official (untouched)
REG_ID_OFF - 8b - RW - official
Request a power off. Need to select the shutdown type between full and sleep.
You can provide a value to delay the execution of power off.
[5..0]: Delay before execution, in seconds. (range: 0-63)
[7..6]: Set to b01 to set screen/keyboard backlight off until pressing touch, b10 trigger a sleep power off, and b11 trigger a full power off.
REG_ID_INT_CFG - 8b - RW
Configure which interrupts is enabled.
The firmware default enabled interrupt is indicated by a 'D'.
[7..6]: Reserved
[0]: Overflow (D)
[1]: Capslock
[2]: Numlock
[3]: Key (D)
[4]: RTC (D)
[5]: Power button (D)
REG_ID_RTC_CFG - RW (WIP)
REG_ID_RTC_DATE - 32b - RW
Write to this register will write to the RTC.
[31..24]: Day of the week
[23..16]: Day
[15..8]: Month
[7..0]: Year
REG_ID_RTC_TIME - 32b - RW
Write to this register will write to the RTC.
[31..24]: Reserved
[23..16]: Secondes
[15..8]: Minutes
[7..0]: Hours
REG_ID_RTC_ALARM_DATE - 32b - RW
[31..24]: Day of the week
[23..16]: Day
[15..8]: Month
[7..0]: Year
REG_ID_RTC_ALARM_TIME - 32b - RW
[31..24]: Reserved
[23..16]: Secondes
[15..8]: Minutes
[7..0]: Hours