38 static constexpr uint16_t ADDRESS = 0x000;
64 static constexpr uint16_t ADDRESS = 0x020;
90 static constexpr uint16_t ADDRESS = 0x021;
115 static constexpr uint16_t ADDRESS = 0x022;
140 static constexpr uint16_t ADDRESS = 0x023;
166 static constexpr uint16_t ADDRESS = 0x024;
190struct AIN1_AIN0_RAW {
191 static constexpr uint16_t ADDRESS = 0x025;
215struct AIN3_AIN2_RAW {
216 static constexpr uint16_t ADDRESS = 0x026;
266 static constexpr uint16_t ADDRESS = 0x040;
270 uint32_t UX1_SELECT : 2;
271 uint32_t VX2_SELECT : 2;
272 uint32_t WY1_SELECT : 2;
273 uint32_t Y2_SELECT : 2;
275 uint32_t MEASUREMENT_MODE : 3;
277 uint32_t TRIGGER_SELECT : 1;
279 uint32_t TRIGGER_POS : 16;
299 static constexpr uint16_t ADDRESS = 0x041;
324 static constexpr uint16_t ADDRESS = 0x042;
349 static constexpr uint16_t ADDRESS = 0x043;
374 static constexpr uint16_t ADDRESS = 0x044;
399 static constexpr uint16_t ADDRESS = 0x045;
424 static constexpr uint16_t ADDRESS = 0x046;
449 static constexpr uint16_t ADDRESS = 0x047;
473 static constexpr uint16_t ADDRESS = 0x048;
525 static constexpr uint16_t ADDRESS = 0x049;
529 uint32_t I0_CLIPPED : 1;
530 uint32_t I1_CLIPPED : 1;
531 uint32_t I2_CLIPPED : 1;
532 uint32_t I3_CLIPPED : 1;
533 uint32_t U0_CLIPPED : 1;
534 uint32_t U1_CLIPPED : 1;
535 uint32_t U2_CLIPPED : 1;
536 uint32_t U3_CLIPPED : 1;
537 uint32_t AIN0_CLIPPED : 1;
538 uint32_t AIN1_CLIPPED : 1;
539 uint32_t AIN2_CLIPPED : 1;
540 uint32_t AIN3_CLIPPED : 1;
541 uint32_t VM_CLIPPED : 1;
542 uint32_t TEMP_CLIPPED : 1;
544 uint32_t I0_DONE : 1;
545 uint32_t I1_DONE : 1;
546 uint32_t I2_DONE : 1;
547 uint32_t I3_DONE : 1;
548 uint32_t U0_DONE : 1;
549 uint32_t U1_DONE : 1;
550 uint32_t U2_DONE : 1;
551 uint32_t U3_DONE : 1;
552 uint32_t AIN0_DONE : 1;
553 uint32_t AIN1_DONE : 1;
554 uint32_t AIN2_DONE : 1;
555 uint32_t AIN3_DONE : 1;
556 uint32_t VM_DONE : 1;
557 uint32_t TEMP_DONE : 1;
586 static constexpr uint16_t ADDRESS = 0x060;
590 uint32_t N_POLE_PAIRS : 7;
632struct MOTION_CONFIG {
633 static constexpr uint16_t ADDRESS = 0x061;
635 static constexpr uint16_t ADDRESS = 0x063;
663 static constexpr uint16_t ADDRESS = 0x080;
667 uint32_t SV_MODE : 2;
668 uint32_t POLARITY : 1;
669 uint32_t CENTER_ALIGNED : 1;
670 uint32_t PWM_FREQ_DIV : 4;
691 static constexpr uint16_t ADDRESS = 0x081;
695 uint32_t MAXCNT : 16;
714 struct SWITCH_LIMIT {
715 static constexpr uint16_t ADDRESS = 0x083;
719 uint32_t SWITCH_VEL_LIMIT : 16;
741 struct ABN_PHI_E_PHI_M {
742 static constexpr uint16_t ADDRESS = 0x0A0;
746 int16_t PHI_E_ABN : 16;
747 int16_t PHI_M_ABN : 16;
773 static constexpr uint16_t ADDRESS = 0x0A1;
780 uint32_t COMBINED_N : 1;
781 uint32_t CLEAR_COUNT_ON_N : 1;
782 uint32_t DISABLE_FILTER : 1;
786 uint32_t DIRECTION : 1;
806 static constexpr uint16_t ADDRESS = (0 << 9) | 0xA2;
820 uint32_t calculateInverseCPR()
const {
822 return cpr ?
static_cast<uint32_t
>((uint64_t{1} << 32) / cpr) : 0u;
840 static constexpr uint16_t ADDRESS = 0x0A3;
844 uint32_t ABN_CPR_INV : 32;
863 static constexpr uint16_t ADDRESS = 0x0A4;
867 uint32_t ABN_COUNT : 24;
887 static constexpr uint16_t ADDRESS = 0x0A5;
891 uint32_t ABN_COUNT_N : 24;
911 struct ABN_PHI_E_OFFSET {
912 static constexpr uint16_t ADDRESS = 0x0A6;
916 int16_t ABN_PHI_E_OFFSET : 16;
939 static constexpr uint16_t ADDRESS = 0x0C0;
943 uint32_t POLARITY : 1;
944 uint32_t EXTRAPOLATION : 1;
967 struct HALL_DPHI_MAX {
968 static constexpr uint16_t ADDRESS = 0x0C1;
972 uint16_t HALL_DPHI_MAX;
991 struct HALL_PHI_E_OFFSET {
992 static constexpr uint16_t ADDRESS = 0x0C2;
996 int16_t HALL_PHI_E_OFFSET;
1016 static constexpr uint16_t ADDRESS = 0x0C3;
1041 struct HALL_PHI_E_EXTRAPOLATED_PHI_E {
1042 static constexpr uint16_t ADDRESS = 0x0C4;
1046 int16_t PHI_E_EXTRAPOLATED;
1067 struct HALL_POSITION_060_000 {
1068 static constexpr uint16_t ADDRESS = 0x0C5;
1072 int16_t POSITION_060 : 16;
1073 int16_t POSITION_000 : 16;
1076 static constexpr int16_t RESET_POSITION_060 = 0x2AAA;
1077 static constexpr int16_t RESET_POSITION_000 = 0x0000;
1094 struct HALL_POSITION_180_120 {
1095 static constexpr uint16_t ADDRESS = 0x0C6;
1099 int16_t POSITION_180 : 16;
1100 int16_t POSITION_120 : 16;
1103 static constexpr int16_t RESET_POSITION_180 = 0x8000;
1104 static constexpr int16_t RESET_POSITION_120 = 0x5555;
1121 struct HALL_POSITION_300_240 {
1122 static constexpr uint16_t ADDRESS = 0x0C7;
1126 int16_t POSITION_300 : 16;
1127 int16_t POSITION_240 : 16;
1130 static constexpr int16_t RESET_POSITION_300 = 0xD555;
1131 static constexpr int16_t RESET_POSITION_240 = 0xAAAA;
1147 struct BIQUAD_V_A1 {
1148 static constexpr uint16_t ADDRESS = 0x0E0;
1151 static constexpr int32_t RESET_BIQUAD_V_A1 = 0x1C376B;
1167 struct BIQUAD_V_A2 {
1168 static constexpr uint16_t ADDRESS = 0x0E1;
1171 static constexpr int32_t RESET_BIQUAD_V_A2 = 0xF38F52;
1187 struct BIQUAD_V_B0 {
1188 static constexpr uint16_t ADDRESS = 0x0E2;
1191 static constexpr int32_t RESET_BIQUAD_V_B0 = 0x000E51;
1207 struct BIQUAD_V_B1 {
1208 static constexpr uint16_t ADDRESS = 0x0E3;
1211 static constexpr int32_t RESET_BIQUAD_V_B1 = 0x001CA1;
1227 struct BIQUAD_V_B2 {
1228 static constexpr uint16_t ADDRESS = 0x0E4;
1231 static constexpr int32_t RESET_BIQUAD_V_B2 = 0x000E51;
1247 struct BIQUAD_V_ENABLE {
1248 static constexpr uint16_t ADDRESS = 0x0E5;
1252 uint32_t ENABLED : 1;
1256 static constexpr uint32_t RESET_BIQUAD_V_ENABLE = 0x1;
1272 struct BIQUAD_T_A1 {
1273 static constexpr uint16_t ADDRESS = 0x0E6;
1276 static constexpr int32_t RESET_BIQUAD_T_A1 = 0x000000;
1292 struct BIQUAD_T_A2 {
1293 static constexpr uint16_t ADDRESS = 0x0E7;
1296 static constexpr int32_t RESET_BIQUAD_T_A2 = 0x000000;
1312 struct BIQUAD_T_B0 {
1313 static constexpr uint16_t ADDRESS = 0x0E8;
1316 static constexpr int32_t RESET_BIQUAD_T_B0 = 0x100000;
1332 struct BIQUAD_T_B1 {
1333 static constexpr uint16_t ADDRESS = 0x0E9;
1336 static constexpr int32_t RESET_BIQUAD_T_B1 = 0x000000;
1352 struct BIQUAD_T_B2 {
1353 static constexpr uint16_t ADDRESS = 0x0EA;
1356 static constexpr int32_t RESET_BIQUAD_T_B2 = 0x000000;
1372 struct BIQUAD_T_ENABLE {
1373 static constexpr uint16_t ADDRESS = 0x0EB;
1377 uint32_t ENABLE : 1;
1381 static constexpr uint32_t RESET_BIQUAD_T_ENABLE = 0x0;
1400 struct VELOCITY_CONFIG {
1401 static constexpr uint16_t ADDRESS = 0x100;
1405 uint32_t SELECTION : 8;
1406 uint32_t METER_SYNC_PULSE : 1;
1407 uint32_t METER_TYPE : 2;
1409 uint32_t MOVING_AVRG_FILTER_SAMPLES : 3;
1429 struct VELOCITY_SCALING {
1430 static constexpr uint16_t ADDRESS = 0x101;
1434 int16_t VELOCITY_SCALING : 16;
1438 static constexpr int16_t RESET_VELOCITY_SCALING =
1459 struct V_MIN_POSDEV_TIME {
1460 static constexpr uint16_t ADDRESS = 0x102;
1464 uint32_t TIME_COUNTER_LIMIT : 16;
1466 uint32_t V_MIN_POS_DEV : 15;
1470 static constexpr uint32_t RESET_V_MIN_POS_DEV =
1472 static constexpr uint32_t RESET_TIME_COUNTER_LIMIT =
1489 struct MAX_VEL_DEVIATION {
1490 static constexpr uint16_t ADDRESS = 0x103;
1494 uint32_t MAX_VEL_DEVIATION : 31;
1498 static constexpr uint32_t RESET_MAX_VEL_DEVIATION =
1515 struct POSITION_CONFIG {
1516 static constexpr uint16_t ADDRESS = 0x120;
1539 struct MAX_POS_DEVIATION {
1540 static constexpr uint16_t ADDRESS = 0x121;
1544 uint32_t MAX_POS_ERR : 31;
1580 struct RAMP_STATUS {
1581 static constexpr uint16_t ADDRESS = 0x140;
1585 uint32_t STATUS_STOP_L : 1;
1586 uint32_t STATUS_STOP_R : 1;
1587 uint32_t STATUS_STOP_H : 1;
1588 uint32_t STATUS_LATCH_L : 1;
1589 uint32_t STATUS_LATCH_R : 1;
1590 uint32_t STATUS_LATCH_H : 1;
1591 uint32_t EVENT_STOP_L : 1;
1592 uint32_t EVENT_STOP_R : 1;
1593 uint32_t EVENT_STOP_H : 1;
1594 uint32_t EVENT_STOP_SG : 1;
1595 uint32_t EVENT_POS_REACHED : 1;
1596 uint32_t VELOCITY_REACHED : 1;
1597 uint32_t POSITION_REACHED : 1;
1598 uint32_t V_ZERO : 1;
1599 uint32_t T_ZEROWAIT_ACTIVE : 1;
1600 uint32_t SECOND_MOVE : 1;
1601 uint32_t STALL_IN_VEL_ERR : 1;
1602 uint32_t STALL_IN_POS_ERR : 1;
1622 static constexpr uint16_t ADDRESS = 0x141;
1623 uint32_t RAMPER_A1 : 23;
1641 static constexpr uint16_t ADDRESS = 0x142;
1642 uint32_t RAMPER_A2 : 23;
1660 static constexpr uint16_t ADDRESS = 0x143;
1661 uint32_t RAMPER_A_MAX : 23;
1679 static constexpr uint16_t ADDRESS = 0x144;
1680 uint32_t RAMPER_D1 : 23;
1698 static constexpr uint16_t ADDRESS = 0x145;
1699 uint32_t RAMPER_D2 : 23;
1717 static constexpr uint16_t ADDRESS = 0x146;
1718 uint32_t RAMPER_D_MAX : 23;
1735 struct RAMP_V_START {
1736 static constexpr uint16_t ADDRESS = 0x147;
1737 uint32_t RAMPER_V_START : 23;
1756 static constexpr uint16_t ADDRESS = 0x148;
1757 uint32_t RAMPER_V1 : 27;
1776 static constexpr uint16_t ADDRESS = 0x149;
1777 uint32_t RAMPER_V2 : 27;
1795 struct RAMP_V_STOP {
1796 static constexpr uint16_t ADDRESS = 0x14A;
1797 uint32_t RAMPER_V_STOP : 23;
1815 static constexpr uint16_t ADDRESS = 0x14B;
1816 uint32_t RAMPER_V_MAX : 27;
1833 struct RAMP_V_TARGET {
1834 static constexpr uint16_t ADDRESS = 0x14C;
1835 int32_t RAMPER_V_TARGET : 28;
1876 struct RAMP_SWITCH_MODE {
1877 static constexpr uint16_t ADDRESS = 0x14D;
1881 uint32_t STOP_L_ENABLE : 1;
1882 uint32_t STOP_R_ENABLE : 1;
1883 uint32_t STOP_H_ENABLE : 1;
1884 uint32_t STOP_L_POL : 1;
1885 uint32_t STOP_R_POL : 1;
1886 uint32_t STOP_H_POL : 1;
1887 uint32_t SWAP_LR : 1;
1888 uint32_t LATCH_L_ACTIVE : 1;
1889 uint32_t LATCH_L_INACTIVE : 1;
1890 uint32_t LATCH_R_ACTIVE : 1;
1891 uint32_t LATCH_R_INACTIVE : 1;
1892 uint32_t LATCH_H_ACTIVE : 1;
1893 uint32_t LATCH_H_INACTIVE : 1;
1894 uint32_t SG_STOP_ENABLE : 1;
1895 uint32_t SOFTSTOP_ENABLE : 1;
1896 uint32_t SW_HARD_STOP : 1;
1897 uint32_t STOP_ON_POS_DEVIATION : 1;
1898 uint32_t STOP_ON_VEL_DEVIATION : 1;
1899 uint32_t VELOCITY_OVERWRITE : 1;
1919 struct RAMP_TIME_CONFIG {
1920 static constexpr uint16_t ADDRESS = 0x14E;
1924 uint16_t T_VMAX : 16;
1926 uint16_t T_ZEROWAIT : 16;
1930 static constexpr uint32_t RESET_T_VMAX = 0x0000;
1931 static constexpr uint32_t RESET_T_ZEROWAIT = 0x0000;
1947 struct RAMP_A_ACTUAL {
1948 static constexpr uint16_t ADDRESS = 0x14F;
1952 int32_t A_ACTUAL : 24;
1956 static constexpr int32_t RESET_RAMPER_A_ACTUAL =
1973 struct RAMP_X_ACTUAL {
1974 static constexpr uint16_t ADDRESS = 0x150;
1976 static constexpr int32_t RESET_RAMPER_X_ACTUAL =
1993 struct RAMP_V_ACTUAL {
1994 static constexpr uint16_t ADDRESS = 0x151;
1998 int32_t RAMPER_V_ACTUAL : 28;
2017 struct RAMP_X_TARGET {
2018 static constexpr uint16_t ADDRESS = 0x152;
2019 int32_t RAMPER_X_TARGET;
2037 static constexpr uint16_t ADDRESS = 0x153;
2041 int16_t RAMPER_PHI_E;
2061 struct RAMP_ACC_FF {
2062 static constexpr uint16_t ADDRESS = 0x155;
2086 struct RAMP_X_ACTUAL_LATCH {
2087 static constexpr uint16_t ADDRESS = 0x156;
2088 int32_t RAMPER_X_ACTUAL_LATCH;
2105 struct POSITION_ACTUAL_LATCH {
2106 static constexpr uint16_t ADDRESS = 0x157;
2107 int32_t POSITION_ACTUAL_LATCH;
2124 struct PRBS_AMPLITUDE {
2125 static constexpr uint16_t ADDRESS = 0x160;
2129 int32_t PRBS_AMPLITUDE : 32;
2132 static constexpr int32_t RESET_PRBS_AMPLITUDE = 0x00000000;
2148 struct PRBS_DOWNSAMPLING_RATIO {
2149 static constexpr uint16_t ADDRESS = 0x161;
2153 uint8_t PRBS_DOWN_SAMPLING_RATIO : 8;
2157 static constexpr uint8_t RESET_PRBS_DOWNSAMPLING_RATIO = 0x00;
2183 static constexpr uint16_t ADDRESS = 0x180;
2188 KEEP_POS_TARGET : 1;
2189 uint32_t CURRENT_NORM_P : 1;
2190 uint32_t CURRENT_NORM_I : 1;
2191 uint32_t VELOCITY_NORM_P : 2;
2192 uint32_t VELOCITY_NORM_I : 2;
2193 uint32_t POSITION_NORM_P : 2;
2194 uint32_t POSITION_NORM_I : 2;
2195 uint32_t VEL_SCALE : 4;
2196 uint32_t POS_SMPL : 7;
2197 uint32_t VEL_SMPL : 7;
2201 static constexpr uint32_t RESET_PID_CONFIG = 0x00000800;
2218 struct PID_FLUX_COEFF {
2219 static constexpr uint16_t ADDRESS = 0x181;
2243 struct PID_TORQUE_COEFF {
2244 static constexpr uint16_t ADDRESS = 0x182;
2268 struct PID_FIELDWEAK_COEFF {
2269 static constexpr uint16_t ADDRESS = 0x183;
2292 struct PID_U_S_MAX {
2293 static constexpr uint16_t ADDRESS = 0x184;
2312 struct PID_VELOCITY_COEFF {
2313 static constexpr uint16_t ADDRESS = 0x185;
2337 struct PID_POSITION_COEFF {
2338 static constexpr uint16_t ADDRESS = 0x186;
2346 static constexpr int16_t RESET_P = 0x0000;
2347 static constexpr int16_t RESET_I = 0x0000;
2364 struct PID_POSITION_TOLERANCE {
2365 static constexpr uint16_t ADDRESS = 0x187;
2369 uint32_t PID_POSITION_TOLERANCE : 31;
2373 static constexpr uint32_t RESET_PID_POSITION_TOLERANCE = 0x0000000;
2390 struct PID_POSITION_TOLERANCE_DELAY {
2391 static constexpr uint16_t ADDRESS = 0x188;
2395 uint16_t PID_POSITION_TOLERANCE_DELAY;
2399 static constexpr uint16_t RESET_PID_POSITION_TOLERANCE_DELAY = 0x0000;
2415 struct PID_UQ_UD_LIMITS {
2416 static constexpr uint16_t ADDRESS = 0x189;
2420 uint16_t PID_UQ_UD_LIMITS;
2424 static constexpr uint16_t RESET_PID_UQ_UD_LIMITS = 0x5A81;
2441 struct PID_TORQUE_FLUX_LIMITS {
2442 static constexpr uint16_t ADDRESS = 0x18A;
2446 uint32_t PID_TORQUE_LIMIT : 15;
2448 uint32_t PID_FLUX_LIMIT : 15;
2467 struct PID_VELOCITY_LIMIT {
2468 static constexpr uint16_t ADDRESS = 0x18B;
2469 uint32_t PID_VELOCITY_LIMIT : 31;
2486 struct PID_POSITION_LIMIT_LOW {
2487 static constexpr uint16_t ADDRESS = 0x18C;
2488 int32_t PID_POSITION_LIMIT_LOW;
2504 struct PID_POSITION_LIMIT_HIGH {
2505 static constexpr uint16_t ADDRESS = 0x18D;
2506 int32_t PID_POSITION_LIMIT_HIGH;
2523 struct PID_TORQUE_FLUX_TARGET {
2524 static constexpr uint16_t ADDRESS = 0x18E;
2528 int16_t PID_TORQUE_TARGET;
2529 int16_t PID_FLUX_TARGET;
2548 struct PID_TORQUE_FLUX_OFFSET {
2549 static constexpr uint16_t ADDRESS = 0x18F;
2553 int16_t PID_TORQUE_OFFSET;
2554 int16_t PID_FLUX_OFFSET;
2572 struct PID_VELOCITY_TARGET {
2573 static constexpr uint16_t ADDRESS = 0x190;
2574 int32_t PID_VELOCITY_TARGET;
2590 struct PID_VELOCITY_OFFSET {
2591 static constexpr uint16_t ADDRESS = 0x191;
2592 int32_t PID_VELOCITY_OFFSET;
2608 struct PID_POSITION_TARGET {
2609 static constexpr uint16_t ADDRESS = 0x192;
2610 int32_t PID_POSITION_TARGET;
2627 struct PID_TORQUE_FLUX_ACTUAL {
2628 static constexpr uint16_t ADDRESS = 0x193;
2632 int16_t PID_TORQUE_ACTUAL;
2633 int16_t PID_FLUX_ACTUAL;
2651 struct PID_VELOCITY_ACTUAL {
2652 static constexpr uint16_t ADDRESS = 0x194;
2653 int32_t PID_VELOCITY_ACTUAL;
2669 struct PID_POSITION_ACTUAL {
2670 static constexpr uint16_t ADDRESS = 0x195;
2671 int32_t PID_POSITION_ACTUAL;
2687 struct PID_POSITION_ACTUAL_OFFSET {
2688 static constexpr uint16_t ADDRESS = 0x196;
2689 int32_t PID_POSITION_ACTUAL_OFFSET;
2705 struct PID_TORQUE_ERROR {
2706 static constexpr uint16_t ADDRESS = 0x197;
2707 int16_t PID_TORQUE_ERROR;
2723 struct PID_FLUX_ERROR {
2724 static constexpr uint16_t ADDRESS = 0x198;
2725 int16_t PID_FLUX_ERROR;
2741 struct PID_VELOCITY_ERROR {
2742 static constexpr uint16_t ADDRESS = 0x199;
2743 int32_t PID_VELOCITY_ERROR;
2759 struct PID_POSITION_ERROR {
2760 static constexpr uint16_t ADDRESS = 0x19A;
2761 int32_t PID_POSITION_ERROR;
2777 struct PID_TORQUE_INTEGRATOR {
2778 static constexpr uint16_t ADDRESS = 0x19B;
2779 int32_t PID_TORQUE_INTEGRATOR;
2795 struct PID_FLUX_INTEGRATOR {
2796 static constexpr uint16_t ADDRESS = 0x19C;
2797 int32_t PID_FLUX_INTEGRATOR;
2813 struct PID_VELOCITY_INTEGRATOR {
2814 static constexpr uint16_t ADDRESS = 0x19D;
2815 int32_t PID_VELOCITY_INTEGRATOR;
2831 struct PID_POSITION_INTEGRATOR {
2832 static constexpr uint16_t ADDRESS = 0x19E;
2833 int32_t PID_POSITION_INTEGRATOR;
2850 struct PIDIN_TORQUE_FLUX_TARGET {
2851 static constexpr uint16_t ADDRESS = 0x1A0;
2855 int16_t PIDIN_TORQUE_TARGET;
2856 int16_t PIDIN_FLUX_TARGET;
2874 struct PIDIN_VELOCITY_TARGET {
2875 static constexpr uint16_t ADDRESS = 0x1A1;
2876 int32_t PIDIN_VELOCITY_TARGET;
2892 struct PIDIN_POSITION_TARGET {
2893 static constexpr uint16_t ADDRESS = 0x1A2;
2894 int32_t PIDIN_POSITION_TARGET;
2911 struct PIDIN_TORQUE_FLUX_TARGET_LIMITED {
2912 static constexpr uint16_t ADDRESS = 0x1A3;
2916 int16_t PIDIN_TORQUE_TARGET_LIMITED;
2917 int16_t PIDIN_FLUX_TARGET_LIMITED;
2935 struct PIDIN_VELOCITY_TARGET_LIMITED {
2936 static constexpr uint16_t ADDRESS = 0x1A4;
2937 int32_t PIDIN_VELOCITY_TARGET_LIMITED;
2953 struct PIDIN_POSITION_TARGET_LIMITED {
2954 static constexpr uint16_t ADDRESS = 0x1A5;
2955 int32_t PIDIN_POSITION_TARGET_LIMITED;
2972 struct FOC_IBETA_IALPHA {
2973 static constexpr uint16_t ADDRESS = 0x1A6;
2998 static constexpr uint16_t ADDRESS = 0x1A7;
3023 static constexpr uint16_t ADDRESS = 0x1A8;
3047 struct FOC_UQ_UD_LIMITED {
3048 static constexpr uint16_t ADDRESS = 0x1A9;
3072 struct FOC_UBETA_UALPHA {
3073 static constexpr uint16_t ADDRESS = 0x1AA;
3097 struct FOC_UWY_UUX {
3098 static constexpr uint16_t ADDRESS = 0x1AB;
3122 static constexpr uint16_t ADDRESS = 0x1AC;
3140 struct PWM_VX2_UX1 {
3141 static constexpr uint16_t ADDRESS = 0x1AD;
3166 static constexpr uint16_t ADDRESS = 0x1AE;
3189 struct VELOCITY_FRQ {
3190 static constexpr uint16_t ADDRESS = 0x1AF;
3191 int32_t VELOCITY_FRQ;
3207 struct VELOCITY_PER {
3208 static constexpr uint16_t ADDRESS = 0x1B0;
3209 int32_t VELOCITY_PER_VAL;
3227 struct U_S_ACTUAL_I_S_ACTUAL {
3228 static constexpr uint16_t ADDRESS = 0x1C0;
3232 uint16_t U_S_ACTUAL;
3233 uint16_t I_S_ACTUAL;
3252 static constexpr uint16_t ADDRESS = 0x1C1;
3282 static constexpr uint16_t ADDRESS = 0x1C2;
3290 uint32_t HALL_U : 1;
3291 uint32_t HALL_V : 1;
3292 uint32_t HALL_W : 1;
3294 uint32_t REF_SW_R : 1;
3295 uint32_t REF_SW_L : 1;
3296 uint32_t REF_SW_H : 1;
3299 uint32_t HALL_U_FILT : 1;
3300 uint32_t HALL_V_FILT : 1;
3301 uint32_t HALL_W_FILT : 1;
3327 struct OUTPUTS_RAW {
3328 static constexpr uint16_t ADDRESS = 0x1C3;
3332 uint32_t PWM_UX1_L : 1;
3333 uint32_t PWM_UX1_H : 1;
3334 uint32_t PWM_VX2_L : 1;
3335 uint32_t PWM_VX2_H : 1;
3336 uint32_t PWM_WY1_L : 1;
3337 uint32_t PWM_WY1_H : 1;
3338 uint32_t PWM_Y2_L : 1;
3339 uint32_t PWM_Y2_H : 1;
3378 struct STATUS_FLAGS {
3379 static constexpr uint16_t ADDRESS = 0x1C4;
3383 uint32_t PID_X_TARGET_LIMIT : 1;
3384 uint32_t PID_X_OUTPUT_LIMIT : 1;
3385 uint32_t PID_V_TARGET_LIMIT : 1;
3386 uint32_t PID_V_OUTPUT_LIMIT : 1;
3387 uint32_t PID_ID_TARGET_LIMIT : 1;
3388 uint32_t PID_ID_OUTPUT_LIMIT : 1;
3389 uint32_t PID_IQ_TARGET_LIMIT : 1;
3390 uint32_t PID_IQ_OUTPUT_LIMIT : 1;
3391 uint32_t IPARK_VOLTLIM_LIMIT_U : 1;
3393 uint32_t PWM_SWITCH_LIMIT_ACTIVE : 1;
3394 uint32_t HALL_ERROR : 1;
3395 uint32_t POSITION_TRACKING_ERROR : 1;
3397 uint32_t VELOCITY_TRACKING_ERROR : 1;
3399 uint32_t PID_FW_OUTPUT_LIMIT : 1;
3403 uint32_t REF_SW_L : 1;
3404 uint32_t REF_SW_R : 1;
3405 uint32_t REF_SW_H : 1;
3406 uint32_t POSITION_REACHED : 1;
3408 uint32_t ADC_I_CLIPPED : 1;
3432 static constexpr uint16_t ADDRESS = 0x1E3;
3433 enum class BridgeEnable : uint8_t {
3440 BridgeEnable BRIDGE_ENABLE_U : 1;
3441 BridgeEnable BRIDGE_ENABLE_V : 1;
3467 static constexpr uint16_t ADDRESS = 0x1E4;
3470 enum class VsUvloLevel : uint8_t {
3490 enum class GateSourceCurrent : uint8_t {
3510 enum class GateSinkCurrent : uint8_t {
3532 GateSinkCurrent IGATE_SINK_UVW : 4;
3533 GateSourceCurrent IGATE_SOURCE_UVW : 4;
3534 GateSinkCurrent IGATE_SINK_Y2 : 4;
3535 GateSourceCurrent IGATE_SOURCE_Y2 : 4;
3536 uint32_t ADAPTIVE_MODE_UVW : 1;
3537 uint32_t ADAPTIVE_MODE_Y2 : 1;
3539 VsUvloLevel VS_UVLO_LVL : 4;
3562 static constexpr uint16_t ADDRESS = 0x1E9;
3566 uint8_t T_DRIVE_SINK_UVW;
3567 uint8_t T_DRIVE_SOURCE_UVW;
3568 uint8_t T_DRIVE_SINK_Y2;
3569 uint8_t T_DRIVE_SOURCE_Y2;
3591 static constexpr uint16_t ADDRESS = 0x1EA;
3626 static constexpr uint16_t ADDRESS = 0x1EB;
3629 enum class TermPwmOnShort : uint8_t {
3635 enum class RetryCount : uint8_t {
3643 enum class VgsBlanking : uint8_t {
3651 enum class VgsDeglitch : uint8_t {
3665 VgsDeglitch VGS_DEGLITCH_UVW : 3;
3666 VgsBlanking VGS_BLANKING_UVW : 2;
3668 VgsDeglitch VGS_DEGLITCH_Y2 : 3;
3669 VgsBlanking VGS_BLANKING_Y2 : 2;
3671 RetryCount LS_RETRIES_UVW : 2;
3672 RetryCount HS_RETRIES_UVW : 2;
3673 RetryCount LS_RETRIES_Y2 : 2;
3674 RetryCount HS_RETRIES_Y2 : 2;
3676 TermPwmOnShort TERM_PWM_ON_SHORT : 1;
3702 static constexpr uint16_t ADDRESS = 0x1EC;
3705 enum class OcpThreshold : uint8_t {
3725 enum class BlankingTime : uint8_t {
3737 enum class DeglitchTime : uint8_t {
3751 DeglitchTime LS_OCP_DEGLITCH_UVW : 3;
3752 BlankingTime LS_OCP_BLANKING_UVW : 3;
3754 OcpThreshold LS_OCP_THRES_UVW : 4;
3756 uint32_t LS_OCP_USE_VDS_UVW : 1;
3758 DeglitchTime HS_OCP_DEGLITCH_UVW : 3;
3759 BlankingTime HS_OCP_BLANKING_UVW : 3;
3761 OcpThreshold HS_OCP_THRES_UVW : 4;
3787 static constexpr uint16_t ADDRESS = 0x1ED;
3790 enum class OcpThreshold : uint8_t {
3810 enum class BlankingTime : uint8_t {
3822 enum class DeglitchTime : uint8_t {
3836 DeglitchTime LS_OCP_DEGLITCH_Y2 : 3;
3837 BlankingTime LS_OCP_BLANKING_Y2 : 3;
3839 OcpThreshold LS_OCP_THRES_Y2 : 4;
3841 uint32_t LS_OCP_USE_VDS_Y2 : 1;
3843 DeglitchTime HS_OCP_DEGLITCH_Y2 : 3;
3844 BlankingTime HS_OCP_BLANKING_Y2 : 3;
3846 OcpThreshold HS_OCP_THRES_Y2 : 4;
3905 struct PROT_ENABLE {
3906 static constexpr uint16_t ADDRESS = 0x1EE;
3911 LS_SHORT_PROT_U : 1;
3913 LS_SHORT_PROT_V : 1;
3915 LS_SHORT_PROT_W : 1;
3916 uint32_t LS_SHORT_PROT_Y2 : 1;
3918 uint32_t LS_VGS_OFF_SHORT_PROT_U : 1;
3920 uint32_t LS_VGS_OFF_SHORT_PROT_V : 1;
3922 uint32_t LS_VGS_OFF_SHORT_PROT_W : 1;
3924 uint32_t LS_VGS_OFF_SHORT_PROT_Y2 : 1;
3926 uint32_t LS_VGS_ON_SHORT_PROT_U : 1;
3928 uint32_t LS_VGS_ON_SHORT_PROT_V : 1;
3930 uint32_t LS_VGS_ON_SHORT_PROT_W : 1;
3932 uint32_t LS_VGS_ON_SHORT_PROT_Y2 : 1;
3934 uint32_t BST_UVLO_PROT_U : 1;
3936 uint32_t BST_UVLO_PROT_V : 1;
3938 uint32_t BST_UVLO_PROT_W : 1;
3940 uint32_t BST_UVLO_PROT_Y2 : 1;
3943 HS_SHORT_PROT_U : 1;
3945 HS_SHORT_PROT_V : 1;
3947 HS_SHORT_PROT_W : 1;
3948 uint32_t HS_SHORT_PROT_Y2 : 1;
3950 uint32_t HS_VGS_OFF_SHORT_PROT_U : 1;
3952 uint32_t HS_VGS_OFF_SHORT_PROT_V : 1;
3954 uint32_t HS_VGS_OFF_SHORT_PROT_W : 1;
3956 uint32_t HS_VGS_OFF_SHORT_PROT_Y2 : 1;
3958 uint32_t HS_VGS_ON_SHORT_PROT_U : 1;
3960 uint32_t HS_VGS_ON_SHORT_PROT_V : 1;
3962 uint32_t HS_VGS_ON_SHORT_PROT_W : 1;
3964 uint32_t HS_VGS_ON_SHORT_PROT_Y2 : 1;
3966 uint32_t VDRV_UVLO_PROT : 1;
3968 uint32_t VS_UVLO_PROT : 1;
4023 struct STATUS_INT_ENABLE {
4024 static constexpr uint16_t ADDRESS = 0x1EF;
4028 uint32_t LS_SHORT_EN_U : 1;
4029 uint32_t LS_SHORT_EN_V : 1;
4030 uint32_t LS_SHORT_EN_W : 1;
4031 uint32_t LS_SHORT_EN_Y2 : 1;
4032 uint32_t LS_VGS_OFF_SHORT_EN_U : 1;
4034 uint32_t LS_VGS_OFF_SHORT_EN_V : 1;
4036 uint32_t LS_VGS_OFF_SHORT_EN_W : 1;
4038 uint32_t LS_VGS_OFF_SHORT_EN_Y2 : 1;
4040 uint32_t LS_VGS_ON_SHORT_EN_U : 1;
4042 uint32_t LS_VGS_ON_SHORT_EN_V : 1;
4044 uint32_t LS_VGS_ON_SHORT_EN_W : 1;
4046 uint32_t LS_VGS_ON_SHORT_EN_Y2 : 1;
4056 uint32_t HS_SHORT_EN_U : 1;
4057 uint32_t HS_SHORT_EN_V : 1;
4058 uint32_t HS_SHORT_EN_W : 1;
4059 uint32_t HS_SHORT_EN_Y2 : 1;
4060 uint32_t HS_VGS_OFF_SHORT_EN_U : 1;
4062 uint32_t HS_VGS_OFF_SHORT_EN_V : 1;
4064 uint32_t HS_VGS_OFF_SHORT_EN_W : 1;
4066 uint32_t HS_VGS_OFF_SHORT_EN_Y2 : 1;
4068 uint32_t HS_VGS_ON_SHORT_EN_U : 1;
4070 uint32_t HS_VGS_ON_SHORT_EN_V : 1;
4072 uint32_t HS_VGS_ON_SHORT_EN_W : 1;
4074 uint32_t HS_VGS_ON_SHORT_EN_Y2 : 1;
4076 uint32_t VDRV_UVLO_EN : 1;
4077 uint32_t VDRV_UVLWRN_EN : 1;
4078 uint32_t VS_UVLO_EN : 1;
4128 static constexpr uint16_t ADDRESS = 0x1F0;
4132 uint32_t LS_SHORT_U : 1;
4133 uint32_t LS_SHORT_V : 1;
4134 uint32_t LS_SHORT_W : 1;
4135 uint32_t LS_SHORT_Y2 : 1;
4136 uint32_t LS_VGS_OFF_SHORT_U : 1;
4137 uint32_t LS_VGS_OFF_SHORT_V : 1;
4138 uint32_t LS_VGS_OFF_SHORT_W : 1;
4139 uint32_t LS_VGS_OFF_SHORT_Y2 : 1;
4140 uint32_t LS_VGS_ON_SHORT_U : 1;
4141 uint32_t LS_VGS_ON_SHORT_V : 1;
4142 uint32_t LS_VGS_ON_SHORT_W : 1;
4143 uint32_t LS_VGS_ON_SHORT_Y2 : 1;
4144 uint32_t BST_UVLO_U : 1;
4145 uint32_t BST_UVLO_V : 1;
4146 uint32_t BST_UVLO_W : 1;
4147 uint32_t BST_UVLO_Y2 : 1;
4148 uint32_t HS_SHORT_U : 1;
4149 uint32_t HS_SHORT_V : 1;
4150 uint32_t HS_SHORT_W : 1;
4151 uint32_t HS_SHORT_Y2 : 1;
4152 uint32_t HS_VGS_OFF_SHORT_U : 1;
4153 uint32_t HS_VGS_OFF_SHORT_V : 1;
4154 uint32_t HS_VGS_OFF_SHORT_W : 1;
4155 uint32_t HS_VGS_OFF_SHORT_Y2 : 1;
4156 uint32_t HS_VGS_ON_SHORT_U : 1;
4157 uint32_t HS_VGS_ON_SHORT_V : 1;
4158 uint32_t HS_VGS_ON_SHORT_W : 1;
4159 uint32_t HS_VGS_ON_SHORT_Y2 : 1;
4160 uint32_t VDRV_UVLO : 1;
4161 uint32_t VDRV_UVLWRN : 1;
4162 uint32_t VS_UVLO : 1;
4198 static constexpr uint16_t ADDRESS = 0x1F1;
4202 uint32_t LS_FAULT_ACTIVE_U : 1;
4203 uint32_t LS_FAULT_ACTIVE_V : 1;
4204 uint32_t LS_FAULT_ACTIVE_W : 1;
4205 uint32_t LS_FAULT_ACTIVE_Y2 : 1;
4207 uint32_t BST_UVLO_STS_U : 1;
4208 uint32_t BST_UVLO_STS_V : 1;
4209 uint32_t BST_UVLO_STS_W : 1;
4210 uint32_t BST_UVLO_STS_Y2 : 1;
4211 uint32_t HS_FAULT_ACTIVE_U : 1;
4212 uint32_t HS_FAULT_ACTIVE_V : 1;
4213 uint32_t HS_FAULT_ACTIVE_W : 1;
4214 uint32_t HS_FAULT_ACTIVE_Y2 : 1;
4216 uint32_t VDRV_UVLO_STS : 1;
4217 uint32_t VDRV_UVLWRN_STS : 1;
4218 uint32_t VS_UVLO_STS : 1;
4237 struct ADC_I1_I0_EXT {
4238 static constexpr uint16_t ADDRESS = 0x200;
4262 static constexpr uint16_t ADDRESS = 0x201;
4286 struct PWM_VX2_UX1_EXT {
4287 static constexpr uint16_t ADDRESS = 0x202;
4311 struct PWM_Y2_WY1_EXT {
4312 static constexpr uint16_t ADDRESS = 0x203;
4335 struct PWM_EXT_Y2_ALT {
4336 static constexpr uint16_t ADDRESS = 0x204;
4340 uint16_t Y2_ALT : 16;
4361 struct VOLTAGE_EXT {
4362 static constexpr uint16_t ADDRESS = 0x205;
4387 static constexpr uint16_t ADDRESS = 0x206;
4410 struct VELOCITY_EXT {
4411 static constexpr uint16_t ADDRESS = 0x208;
4415 int32_t VELOCITY_EXT;
Definition tmc9660_adc.hpp:12