Errors
Error handling with Koheron V1 firmware.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.
V1 firmware reports errors through a 32-bit hexadecimal bitmask. Each bit corresponds to one error slot supported by the connected product firmware.
Use errlist on the connected device to display the authoritative bit-index list for that firmware. Line 0 is bit 0, line 1 is bit 1, and so on. The line index maps directly to the bit index.
Command responses may omit leading zeros. For example, bit 2 may be printed as 4 instead of 00000004.
Error commands
| Command | Description |
|---|---|
err |
Read the current active error bitmask. |
errlist |
List the complete error bit layout for the connected device. |
errclr |
Clear selected active error bits. |
errmsk |
Read or set the error mask used for masked alarm/status reporting. |
ecrc |
Read the saved configuration CRC. |
logerr |
Return the binary status snapshot associated with the last error. |
seqerr |
Read latched sequencer diagnostics. |
Reading errors
err returns the active error bitmask in hexadecimal.
>> err
0
A response of 0 means that no error is currently reported. A non-zero value means that one or more error bits are active.
Example with bit 2 active:
>> err
4
The response 4 means bit 2 is active. Use errlist to map bit 2 to the corresponding error name for the connected firmware.
Listing error bits with errlist
errlist prints the complete error bit layout for the connected device.
The first printed line is bit 0, the second printed line is bit 1, and so on.
The first 18 entries are the common error prefix. Product-specific errors, when present, start at bit 18.
Common error prefix
The first 18 error slots are common to Koheron V1 firmware. Product-specific errors, when present, start at bit 18.
| Bit | Mask | Error | Summary |
|---|---|---|---|
| 0 | 00000001 |
UART_RX_OVERFLOW |
UART receive ring filled and at least one incoming byte was lost. |
| 1 | 00000002 |
CMD_FRAME_TOO_LONG |
One text command or raw binary frame exceeded the CLI frame capacity. |
| 2 | 00000004 |
CMD_UNKNOWN |
The received command is not known by the connected firmware. |
| 3 | 00000008 |
CMD_INVALID_ARG |
A command argument, value, or runtime request is invalid. |
| 4 | 00000010 |
CMD_ARG_OUT_OF_RANGE |
A well-formed numeric value is outside the allowed limits. |
| 5 | 00000020 |
CMD_ACCESS_DENIED |
A valid write command was rejected because the current user mode is too low. |
| 6 | 00000040 |
CMD_INVALID_CRC |
A command or payload using CRC protection had an invalid CRC. |
| 7 | 00000080 |
EEPROM_CONFIG_CRC |
The saved EEPROM configuration CRC is invalid. |
| 8 | 00000100 |
BOARD_MODEL_UNKNOWN |
The connected board model was not recognized. |
| 9 | 00000200 |
BOARD_OVERTEMPERATURE |
The board temperature exceeded an allowed limit. |
| 10 | 00000400 |
BUS_UNDERVOLTAGE |
A monitored bus voltage was below an allowed limit. |
| 11 | 00000800 |
BUS_OVERVOLTAGE |
A monitored bus voltage was above an allowed limit. |
| 12 | 00001000 |
OUTPUT_UNDERTEMPERATURE |
A monitored output temperature was below an allowed limit. |
| 13 | 00002000 |
OUTPUT_OVERTEMPERATURE |
A monitored output temperature exceeded an allowed limit. |
| 14 | 00004000 |
INTERLOCK_TRIGGERED |
The interlock input or safety condition is active. |
| 15 | 00008000 |
I2C_ERROR |
An I2C device communication failed or timed out. |
| 16 | 00010000 |
FLASH_SIGNATURE_INVALID |
Firmware flash-integrity verification failed during startup. |
| 17 | 00020000 |
SEQU_ERROR |
A fatal sequencer fault occurred; read seqerr for details. |
Product-specific errors
Product-specific errors start at bit 18. The exact product-specific list depends on the connected product and firmware version.
Run errlist on the connected device to get the complete bit layout for the firmware you are using.
Clearing errors
errclr clears active error bits.
With no argument, it applies the clear mask ffffffff and prints ffffffff.
>> err
4
>> errclr
ffffffff
>> err
0
With one hexadecimal argument, errclr clears only the error bits selected by that mask and prints the mask that was applied.
>> errclr 4
4
Only clear an error after reviewing the condition that caused it. Clearing SEQU_ERROR also clears the full bitmap returned by seqerr; clearing an unrelated bit does not. If the underlying condition is still present, the error may be reported again.
errclr is a write command and requires normal mode or higher. Invalid extra arguments are reported as CMD_INVALID_ARG. A valid clear request made from a user mode that is too low is reported as CMD_ACCESS_DENIED.
Error mask
errmsk reads or writes the error mask used for masked alarm or status reporting.
>> errmsk
ffffffff
>> errmsk fffffffe
fffffffe
Reading errmsk does not require write access. Writing a new mask requires normal mode or higher.
The error mask selects which error bits contribute to masked alarm or status reporting. It does not clear active errors. Use errclr to clear errors.
For example, if bit 0 is masked out with fffffffe, UART_RX_OVERFLOW no longer contributes to masked alarm/status reporting, but the error can still be visible in err while it is active.
Use save after changing errmsk if the new error mask should be restored at boot. save is a write command and requires advanced mode. The saved value is loaded only when the CFG switch is set to 1 at boot.
Saved configuration CRC
ecrc reports the saved configuration CRC.
If the saved configuration CRC is invalid, the firmware may report EEPROM_CONFIG_CRC and keep the product default configuration active instead of loading the saved configuration.
Use save after reviewing the active configuration if the current settings should be saved. save writes a new saved configuration CRC after saving the configuration.
Error snapshot
logerr returns the binary status snapshot associated with the last error.
Use it for diagnostics when the current status has changed since the error occurred. The snapshot format follows the binary status format described in Binary Status.
Typical workflow:
- Read
err. - If an error is active, read
logerr. - Decode the binary status snapshot using the product binary status format.
- Compare the snapshot to the current status.
Troubleshooting workflow
- Read
err. - Read
errliston the same device. - Identify the active error bits.
- If needed, read
logerrto inspect the status snapshot associated with the last error. - Review and fix the cause.
- Clear the reviewed error bits with
errclr. - Read
erragain.
If the same error is reported again, the underlying condition may still be present.