Skip to content

Commit 084ac4d

Browse files
authored
Add semantic version register (#68)
* Add semantic version register * Include interface hash in version register We also refine our terminology by referring to the `device.yml` file as the interface schema file.
1 parent ceb1c7e commit 084ac4d

File tree

1 file changed

+60
-3
lines changed

1 file changed

+60
-3
lines changed

Device.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ As an application example, devices using USB as the transport layer can poll for
5151
|R\_UID|No|Yes|U8|016|b)|Stores a unique identifier (UID) |Optional|
5252
|R\_TAG|-|Yes|U8|017|b)|Firmware tag|Optional|
5353
|R\_HEARTBEAT|Yes|Yes|U16|018|b)|Provides information about the state of the device|Yes|
54+
|R\_VERSION|-|Yes|U8|019|a)|Semantic version information for the device|Yes|
5455

5556
||a) These values are stored during factory process and are persistent, i.e., they cannot be changed by the user.<br>b) Check register notes on the specific register explanation<br>c) Only parts of the functionality is mandatory. Check register notes on the explanation.|
5657
| :- | :- |
@@ -474,6 +475,59 @@ The status of the device is given by the following bits:
474475

475476
* **IS_SYNCHRONIZED [Bit 1]:** If set to 1, the device is synchronized with an external Harp clock generator. If the device is itself a clock generator (see `R_CLOCK_CONFIG` bit `CLK_GEN`), by definition, this bit will always be set to 1.
476477

478+
#### **`R_VERSION` (U8) – Semantic version information**
479+
480+
Address: `019`
481+
482+
```mermaid
483+
---
484+
displayMode: compact
485+
---
486+
gantt
487+
title R_VERSION (019)
488+
dateFormat X
489+
axisFormat %
490+
491+
section Byte
492+
0 :prot_major, 0, 1
493+
1 :prot_minor, 1, 2
494+
2 :prot_patch, 2, 3
495+
3 :fw_major, 3, 4
496+
4 :fw_minor, 4, 5
497+
5 :fw_patch, 5, 6
498+
6 :hw_major, 6, 7
499+
7 :hw_minor, 7, 8
500+
8 :hw_patch, 8, 9
501+
9-11 :sdk_id, 9, 12
502+
12-31 :interface_hash, 12, 32
503+
504+
section Id
505+
PROTOCOL :protocol, 0, 3
506+
FIRMWARE :firmware, 3, 6
507+
HARDWARE :hardware, 6, 9
508+
SDK_ID :sdk, 9, 12
509+
INTERFACE_HASH :protocol, 12, 32
510+
511+
section Default
512+
- :d0, 0, 3
513+
- :d1, 3, 6
514+
- :d2, 6, 9
515+
- :d3, 9, 12
516+
- :d4, 12, 32
517+
```
518+
519+
The bytes in this register specify the [semantic version](https://semver.org/) of different device components. Each component version is made up of three bytes, following the order `major`, `minor`, `patch`. The register also includes a unique identifier of the core microcontroller SDK and a hash digest of the interface schema file describing the device capabilities.
520+
521+
* **PROTOCOL:** The semantic version of the Harp protocol implemented by the device.
522+
523+
* **FIRMWARE:** The semantic version of the device firmware application.
524+
525+
* **HARDWARE:** The semantic version of the device hardware.
526+
527+
* **SDK_ID:** The three-character code of the core microcontroller SDK used to implement the device.
528+
529+
* **INTERFACE_HASH:** The SHA-1 hash value of the device interface schema file (`device.yml`). The byte-order is little-endian.
530+
477531

478532
## Release notes:
479533

@@ -526,12 +580,15 @@ The status of the device is given by the following bits:
526580
* Clarify `Connected` behavior between host and device and add application examples.
527581

528582
- v1.10.0
529-
* Add `UID` register
583+
* Add `R_UID` register
530584
* Add future deprecation warning to `R_SERIAL_NUMBER` register.
531585

532586
- v1.11.0
533-
* Add new `Tag` register.
587+
* Add new `R_TAG` register.
534588

535589
- v1.12.0
536590
* Add heartbeat register providing status information
537-
* Fix typo in `OPERATION_CTRL` register data type (U16 -> U8)
591+
* Fix typo in `R_OPERATION_CTRL` register data type (U16 -> U8)
592+
593+
- v1.13.0
594+
* Add `R_VERSION` register.

0 commit comments

Comments
 (0)