HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
|
Enumerations | |
enum class | RamDebugSub : uint8_t { Init = 0 , SetSampleCount = 1 , SetPrescaler = 3 , SetChannel = 4 , SetTriggerChannel = 5 , SetTriggerMaskShift = 6 , TriggerStart = 7 , GetState = 8 , ReadSample = 9 , GetInfo = 10 , GetChannelType = 11 , GetChannelAddress = 12 , SetPreTriggerCount = 13 , GetPreTriggerCount = 14 } |
RAMDebug subcommands. More... | |
enum class | InfoSelect : uint8_t { MaxChannels = 0 , MaxSamples = 1 , FrequencyHz = 2 , CapturedSamples = 3 , PrescalerOnTrigger = 4 } |
RAMDebug info selections (for subcommand GetInfo) More... | |
enum class | RamDebugState : uint8_t { Idle = 0 , Trigger = 1 , Capture = 2 , Complete = 3 , PreTrigger = 4 } |
RAMDebug states (returned by GetState) More... | |
enum class | TriggerType : uint8_t { NoTrigger = 0 , RisingEdgeS = 1 , FallingEdgeS = 2 , AnyEdgeS = 3 , RisingEdgeU = 4 , FallingEdgeU = 5 , AnyEdgeU = 6 } |
Trigger types (for TriggerStart) More... | |
Functions | |
static uint16_t | ramDebugOffset (RamDebugSub sub, uint8_t index=0) |
Construct the RAMDebug register offset for a given subcommand and index. | |
Variables | |
static constexpr uint8_t | RAMDEBUG_BLOCK = 31 |
Block number for RAMDebug (SPI interface) | |
static constexpr uint8_t | RAMDEBUG_UART_CMD = 142 |
UART command number for RAMDebug. | |
|
strong |
RAMDebug info selections (for subcommand GetInfo)
Options for retrieving general RAMDebug information.
Enumerator | |
---|---|
MaxChannels | Maximum number of channels supported. |
MaxSamples | Maximum number of samples supported. |
FrequencyHz | RAMDebug frequency in Hz. |
CapturedSamples | Number of samples already captured. |
PrescalerOnTrigger | Prescaler value at the trigger event. |
|
strong |
RAMDebug states (returned by GetState)
Represents the current state of the RAMDebug system.
Enumerator | |
---|---|
Idle | RAMDebug is not running and can be configured. |
Trigger | Waiting for the trigger event. |
Capture | Capturing samples after the trigger. |
Complete | Capture is complete, samples can be downloaded. |
PreTrigger | Capturing pretrigger samples. |
|
strong |
RAMDebug subcommands.
Subcommands used to configure and operate the RAMDebug feature.
Enumerator | |
---|---|
Init | Initialize and reset RAMDebug. |
SetSampleCount | Set the total number of samples to collect. |
SetPrescaler | Set the prescaler (divider = value + 1). |
SetChannel | Configure a capture channel. |
SetTriggerChannel | Configure the trigger channel. |
SetTriggerMaskShift | Set mask and shift before trigger evaluation. |
TriggerStart | Set trigger type and start measurement. |
GetState | Read the current RAMDebug state. |
ReadSample | Read a captured sample by index. |
GetInfo | Read general RAMDebug information. |
GetChannelType | Read the configured channel type. |
GetChannelAddress | Read the configured channel address. |
SetPreTriggerCount | Set the total number of pretrigger samples. |
GetPreTriggerCount | Read the total number of pretrigger samples. |
|
strong |
Trigger types (for TriggerStart)
Defines the trigger types for starting a measurement.
|
inlinestatic |
Construct the RAMDebug register offset for a given subcommand and index.
The offset is: (subcommand << 6) | (index & 0x3F).
sub | Subcommand value. |
index | Index or value parameter (0-63). |
|
staticconstexpr |
Block number for RAMDebug (SPI interface)
|
staticconstexpr |
UART command number for RAMDebug.