HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
tmc9660::register_mode::ADC::CSA_SETUP Struct Reference

Current Sense Amplifier (CSA) Setup Register for current measurement configuration. More...

#include <tmc9660_adc.hpp>

Public Types

enum class  CSAFilterLength : uint8_t { OFF = 0 , LENGTH_2 = 1 , LENGTH_4 = 2 , LENGTH_8 = 3 }
 CSA AZ filter length exponent. More...
 
enum class  CSAFilterBW : uint8_t { BW_0U55 = 0 , BW_0U75 = 1 , BW_1U00 = 2 , BW_1U35 = 3 }
 CSA bandwidth filter settings. More...
 
enum class  CSAGain : uint8_t { X5 = 0 , X10 = 1 , X20 = 2 , X40 = 3 }
 CSA gain settings. More...
 

Public Attributes

union { 
 
   uint32_t   value 
 
   struct { 
 
      uint32_t   CSA0_EN: 1 
 CSA0 enable. More...
 
      uint32_t   CSA1_EN: 1 
 CSA1 enable. More...
 
      uint32_t   CSA2_EN: 1 
 CSA2 enable. More...
 
      uint32_t   CSA3_EN: 1 
 CSA3 enable. More...
 
      CSAGain   CSA012_GAIN: 2 
 Gain for CSA0...2. More...
 
      uint32_t   CSA012_BYPASS: 1 
 Bypass for CSA0...2. More...
 
      uint32_t   : 1 
 
      CSAGain   CSA3_GAIN: 2 
 Gain for CSA3. More...
 
      uint32_t   CSA3_BYPASS: 1 
 Bypass for CSA3. More...
 
      uint32_t   : 1 
 
      CSAFilterBW   CSA012_FILT: 2 
 BW filter for CSA0...2. More...
 
      CSAFilterBW   CSA3_FILT: 2 
 BW filter for CSA3. More...
 
      uint32_t   : 0 
 
      CSAFilterLength   CSA_AZ_FLTLNGTH_EXP: 4 
 Filter length exponent for AZ values. More...
 
      uint32_t   : 12 
 
   }   bits 
 
};  
 

Static Public Attributes

static constexpr uint8_t ADDRESS = 0x07
 Register address (Block 1)
 

Detailed Description

Current Sense Amplifier (CSA) Setup Register for current measurement configuration.

Configures the on-chip current sense amplifiers that provide high-precision current measurements for motor control. Each CSA can be independently configured with different gain settings, bandwidth filters, and bypass modes to optimize performance for specific measurement requirements.

The CSA configuration directly affects current measurement accuracy and bandwidth, which are critical parameters for motor control performance. Proper gain selection ensures optimal signal-to-noise ratio while appropriate filtering reduces switching noise from PWM operations.

Configures the on-chip current sense amplifiers (CSAs).

Block 1, Address: 0x007

Register Map:

Bits Name Access Description
19:16 CSA_AZ_FLTLNGTH_EXP RW Filter length exponent for AZ values.
15:14 CSA3_FILT RW Bandwidth filter settings for CSA3.
13:12 CSA012_FILT RW Bandwidth filter settings for CSA0...2.
10 CSA3_BYPASS RW Bypass of CSA3.
9:8 CSA3_GAIN RW Gain for CSA3.
6 CSA012_BYPASS RW Bypass of CSA0...2.
5:4 CSA012_GAIN RW Gain for CSA0...2.
3 CSA3_EN RW CSA3 enable.
2 CSA2_EN RW CSA2 enable.
1 CSA1_EN RW CSA1 enable.
0 CSA0_EN RW CSA0 enable.
Note
This register configures CSA gain, filter, and bypass settings.

Member Enumeration Documentation

◆ CSAFilterBW

CSA bandwidth filter settings.

Enumerator
BW_0U55 

0.55us

BW_0U75 

0.75us

BW_1U00 

1.00us

BW_1U35 

1.35us

◆ CSAFilterLength

CSA AZ filter length exponent.

Enumerator
OFF 

No filter (length = 1)

LENGTH_2 

Filter over 2 values.

LENGTH_4 

Filter over 4 values.

LENGTH_8 

Filter over 8 values.

◆ CSAGain

CSA gain settings.

Enumerator
X5 

x5

X10 

x10

X20 

x20

X40 

x40

Member Data Documentation

◆ [union]

◆ __pad0__

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::__pad0__

◆ __pad1__

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::__pad1__

◆ __pad2__

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::__pad2__

◆ __pad3__

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::__pad3__

◆ ADDRESS

constexpr uint8_t tmc9660::register_mode::ADC::CSA_SETUP::ADDRESS = 0x07
staticconstexpr

Register address (Block 1)

◆ [struct]

struct { ... } tmc9660::register_mode::ADC::CSA_SETUP::bits

◆ CSA012_BYPASS

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA012_BYPASS

Bypass for CSA0...2.

◆ CSA012_FILT

CSAFilterBW tmc9660::register_mode::ADC::CSA_SETUP::CSA012_FILT

BW filter for CSA0...2.

◆ CSA012_GAIN

CSAGain tmc9660::register_mode::ADC::CSA_SETUP::CSA012_GAIN

Gain for CSA0...2.

◆ CSA0_EN

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA0_EN

CSA0 enable.

◆ CSA1_EN

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA1_EN

CSA1 enable.

◆ CSA2_EN

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA2_EN

CSA2 enable.

◆ CSA3_BYPASS

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA3_BYPASS

Bypass for CSA3.

◆ CSA3_EN

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::CSA3_EN

CSA3 enable.

◆ CSA3_FILT

CSAFilterBW tmc9660::register_mode::ADC::CSA_SETUP::CSA3_FILT

BW filter for CSA3.

◆ CSA3_GAIN

CSAGain tmc9660::register_mode::ADC::CSA_SETUP::CSA3_GAIN

Gain for CSA3.

◆ CSA_AZ_FLTLNGTH_EXP

CSAFilterLength tmc9660::register_mode::ADC::CSA_SETUP::CSA_AZ_FLTLNGTH_EXP

Filter length exponent for AZ values.

◆ value

uint32_t tmc9660::register_mode::ADC::CSA_SETUP::value

The documentation for this struct was generated from the following file: