# 4.8. Diagnostic Kernel

The diagnostic kernel allows real-time diagnostics and testing through interaction with an external host PC. At this time, two variants can be used:

- X2C-Scope from the Linz Center of Mechatronics GmbH, for use with the X2C-Scope plugin for MPLAB® X. This is the default variant.
- RTDM from Microchip, for use with the MPLAB® DMCI plugin. Contact Microchip if you wish to use this variant instead.

Both variants are configured to sample data at the control ISR (nominally 20kHz) and use a UART channel for communication with the host PC.

## 4.8.1. Implementation Notes

### 4.8.1.1. Modules

Module | Files | Description | Comments
--- | --- | --- | ---
`diagnostics` | `diagnostics.c` `diagnostics.h` | Top-level diagnostics |
`rtdm` | `rtdm.c` `rtdm.h` `rtdm_hal_adapter.h` `rtdm_select_channels.c` `rtdm_select_channels.h` | RTDM testing and diagnostics |