Koheron products currently ship with firmware V0.x by default. Firmware V1 is under active development and is not publicly available yet.
Contact us if you would like early access or want to evaluate V1 firmware on your device.
seqstat
Read the packed sequencer execution status.
seqstat is read-only and accepts no arguments. It returns exactly eight hexadecimal digits.
Usage
>> seqstat
00808173
Status word
The eight-digit response represents one 32-bit status word:
| Bits | Description |
|---|---|
| 0–3 | Sequencer state |
| 4–7 | Status flags |
| 8–14 | Current instruction index |
| 15–21 | Program instruction count |
| 22–25 | Stop reason |
| 26–31 | Reserved; currently zero |
The current program index and entry count are seven-bit unsigned values. The status flags are:
| Bit | Name | Meaning |
|---|---|---|
| 4 | LAST_VALID |
A last-command result is available. |
| 5 | LAST_OK |
The last command succeeded. This flag is meaningful only when LAST_VALID is set. |
| 6 | PROGRAM_LOADED |
The stored program was loaded successfully. |
| 7 | Reserved | Currently zero. |
Sequencer states
| Value | Name | Meaning |
|---|---|---|
0 |
STOPPED |
Sequencer execution is stopped. |
1 |
LOADING |
The stored program is being loaded. |
2 |
WAITING |
The program is loaded and waiting for the next timed instruction. |
3 |
FINISHED |
Program execution completed normally. |
4 |
ERROR |
Loading or execution stopped because of an error. |
Stop reasons
| Value | Name | Meaning |
|---|---|---|
0 |
NONE |
No terminal reason is recorded. |
1 |
USER |
Execution was stopped with sequ 0. |
2 |
FINISHED |
Program execution completed normally. |
3 |
LOAD_ERROR |
The stored program could not be loaded or parsed. |
4 |
EXEC_ERROR |
An error occurred while executing the program. |
Decoding example
The response 00808173 decodes as follows:
- state
3:FINISHED; - flags
0x7:LAST_VALID,LAST_OK, andPROGRAM_LOADEDare set; - current program index
1; - program entry count
1; - stop reason
2:FINISHED; - reserved bits 26–31 are zero.
Terminal information remains available after the sequencer stops. Use sequ to control execution.
Detailed faults are not part of this status word. Read the latched bitmap with seqerr.
If loading fails, PROGRAM_LOADED is clear and both the instruction index and count are reset to zero. Correct the EEPROM image and use sequ 1 to perform a clean load.