9namespace register_mode {
26 static constexpr uint16_t ADDRESS = 0x000;
52 static constexpr uint16_t ADDRESS = 0x020;
78 static constexpr uint16_t ADDRESS = 0x021;
103 static constexpr uint16_t ADDRESS = 0x022;
128 static constexpr uint16_t ADDRESS = 0x023;
154 static constexpr uint16_t ADDRESS = 0x024;
178struct AIN1_AIN0_RAW {
179 static constexpr uint16_t ADDRESS = 0x025;
203struct AIN3_AIN2_RAW {
204 static constexpr uint16_t ADDRESS = 0x026;
254 static constexpr uint16_t ADDRESS = 0x040;
258 uint32_t UX1_SELECT : 2;
259 uint32_t VX2_SELECT : 2;
260 uint32_t WY1_SELECT : 2;
261 uint32_t Y2_SELECT : 2;
263 uint32_t MEASUREMENT_MODE : 3;
265 uint32_t TRIGGER_SELECT : 1;
267 uint32_t TRIGGER_POS : 16;
287 static constexpr uint16_t ADDRESS = 0x041;
312 static constexpr uint16_t ADDRESS = 0x042;
337 static constexpr uint16_t ADDRESS = 0x043;
362 static constexpr uint16_t ADDRESS = 0x044;
387 static constexpr uint16_t ADDRESS = 0x045;
412 static constexpr uint16_t ADDRESS = 0x046;
437 static constexpr uint16_t ADDRESS = 0x047;
461 static constexpr uint16_t ADDRESS = 0x048;
513 static constexpr uint16_t ADDRESS = 0x049;
517 uint32_t I0_CLIPPED : 1;
518 uint32_t I1_CLIPPED : 1;
519 uint32_t I2_CLIPPED : 1;
520 uint32_t I3_CLIPPED : 1;
521 uint32_t U0_CLIPPED : 1;
522 uint32_t U1_CLIPPED : 1;
523 uint32_t U2_CLIPPED : 1;
524 uint32_t U3_CLIPPED : 1;
525 uint32_t AIN0_CLIPPED : 1;
526 uint32_t AIN1_CLIPPED : 1;
527 uint32_t AIN2_CLIPPED : 1;
528 uint32_t AIN3_CLIPPED : 1;
529 uint32_t VM_CLIPPED : 1;
530 uint32_t TEMP_CLIPPED : 1;
532 uint32_t I0_DONE : 1;
533 uint32_t I1_DONE : 1;
534 uint32_t I2_DONE : 1;
535 uint32_t I3_DONE : 1;
536 uint32_t U0_DONE : 1;
537 uint32_t U1_DONE : 1;
538 uint32_t U2_DONE : 1;
539 uint32_t U3_DONE : 1;
540 uint32_t AIN0_DONE : 1;
541 uint32_t AIN1_DONE : 1;
542 uint32_t AIN2_DONE : 1;
543 uint32_t AIN3_DONE : 1;
544 uint32_t VM_DONE : 1;
545 uint32_t TEMP_DONE : 1;
574 static constexpr uint16_t ADDRESS = 0x060;
578 uint32_t N_POLE_PAIRS : 7;
620struct MOTION_CONFIG {
621 static constexpr uint16_t ADDRESS = 0x061;
623 static constexpr uint16_t ADDRESS = 0x063;
651 static constexpr uint16_t ADDRESS = 0x080;
655 uint32_t SV_MODE : 2;
656 uint32_t POLARITY : 1;
657 uint32_t CENTER_ALIGNED : 1;
658 uint32_t PWM_FREQ_DIV : 4;
679 static constexpr uint16_t ADDRESS = 0x081;
683 uint32_t MAXCNT : 16;
702 struct SWITCH_LIMIT {
703 static constexpr uint16_t ADDRESS = 0x083;
707 uint32_t SWITCH_VEL_LIMIT : 16;
729 struct ABN_PHI_E_PHI_M {
730 static constexpr uint16_t ADDRESS = 0x0A0;
734 int16_t PHI_E_ABN : 16;
735 int16_t PHI_M_ABN : 16;
761 static constexpr uint16_t ADDRESS = 0x0A1;
768 uint32_t COMBINED_N : 1;
769 uint32_t CLEAR_COUNT_ON_N : 1;
770 uint32_t DISABLE_FILTER : 1;
774 uint32_t DIRECTION : 1;
794 static constexpr uint16_t ADDRESS = (0 << 9) | 0xA2;
808 uint32_t calculateInverseCPR()
const {
810 return cpr ?
static_cast<uint32_t
>((uint64_t{1} << 32) / cpr) : 0u;
828 static constexpr uint16_t ADDRESS = 0x0A3;
832 uint32_t ABN_CPR_INV : 32;
851 static constexpr uint16_t ADDRESS = 0x0A4;
855 uint32_t ABN_COUNT : 24;
875 static constexpr uint16_t ADDRESS = 0x0A5;
879 uint32_t ABN_COUNT_N : 24;
899 struct ABN_PHI_E_OFFSET {
900 static constexpr uint16_t ADDRESS = 0x0A6;
904 int16_t ABN_PHI_E_OFFSET : 16;
927 static constexpr uint16_t ADDRESS = 0x0C0;
931 uint32_t POLARITY : 1;
932 uint32_t EXTRAPOLATION : 1;
955 struct HALL_DPHI_MAX {
956 static constexpr uint16_t ADDRESS = 0x0C1;
960 uint16_t HALL_DPHI_MAX;
979 struct HALL_PHI_E_OFFSET {
980 static constexpr uint16_t ADDRESS = 0x0C2;
984 int16_t HALL_PHI_E_OFFSET;
1004 static constexpr uint16_t ADDRESS = 0x0C3;
1029 struct HALL_PHI_E_EXTRAPOLATED_PHI_E {
1030 static constexpr uint16_t ADDRESS = 0x0C4;
1034 int16_t PHI_E_EXTRAPOLATED;
1055 struct HALL_POSITION_060_000 {
1056 static constexpr uint16_t ADDRESS = 0x0C5;
1060 int16_t POSITION_060 : 16;
1061 int16_t POSITION_000 : 16;
1064 static constexpr int16_t RESET_POSITION_060 = 0x2AAA;
1065 static constexpr int16_t RESET_POSITION_000 = 0x0000;
1082 struct HALL_POSITION_180_120 {
1083 static constexpr uint16_t ADDRESS = 0x0C6;
1087 int16_t POSITION_180 : 16;
1088 int16_t POSITION_120 : 16;
1091 static constexpr int16_t RESET_POSITION_180 = 0x8000;
1092 static constexpr int16_t RESET_POSITION_120 = 0x5555;
1109 struct HALL_POSITION_300_240 {
1110 static constexpr uint16_t ADDRESS = 0x0C7;
1114 int16_t POSITION_300 : 16;
1115 int16_t POSITION_240 : 16;
1118 static constexpr int16_t RESET_POSITION_300 = 0xD555;
1119 static constexpr int16_t RESET_POSITION_240 = 0xAAAA;
1135 struct BIQUAD_V_A1 {
1136 static constexpr uint16_t ADDRESS = 0x0E0;
1139 static constexpr int32_t RESET_BIQUAD_V_A1 = 0x1C376B;
1155 struct BIQUAD_V_A2 {
1156 static constexpr uint16_t ADDRESS = 0x0E1;
1159 static constexpr int32_t RESET_BIQUAD_V_A2 = 0xF38F52;
1175 struct BIQUAD_V_B0 {
1176 static constexpr uint16_t ADDRESS = 0x0E2;
1179 static constexpr int32_t RESET_BIQUAD_V_B0 = 0x000E51;
1195 struct BIQUAD_V_B1 {
1196 static constexpr uint16_t ADDRESS = 0x0E3;
1199 static constexpr int32_t RESET_BIQUAD_V_B1 = 0x001CA1;
1215 struct BIQUAD_V_B2 {
1216 static constexpr uint16_t ADDRESS = 0x0E4;
1219 static constexpr int32_t RESET_BIQUAD_V_B2 = 0x000E51;
1235 struct BIQUAD_V_ENABLE {
1236 static constexpr uint16_t ADDRESS = 0x0E5;
1240 uint32_t ENABLED : 1;
1244 static constexpr uint32_t RESET_BIQUAD_V_ENABLE = 0x1;
1260 struct BIQUAD_T_A1 {
1261 static constexpr uint16_t ADDRESS = 0x0E6;
1264 static constexpr int32_t RESET_BIQUAD_T_A1 = 0x000000;
1280 struct BIQUAD_T_A2 {
1281 static constexpr uint16_t ADDRESS = 0x0E7;
1284 static constexpr int32_t RESET_BIQUAD_T_A2 = 0x000000;
1300 struct BIQUAD_T_B0 {
1301 static constexpr uint16_t ADDRESS = 0x0E8;
1304 static constexpr int32_t RESET_BIQUAD_T_B0 = 0x100000;
1320 struct BIQUAD_T_B1 {
1321 static constexpr uint16_t ADDRESS = 0x0E9;
1324 static constexpr int32_t RESET_BIQUAD_T_B1 = 0x000000;
1340 struct BIQUAD_T_B2 {
1341 static constexpr uint16_t ADDRESS = 0x0EA;
1344 static constexpr int32_t RESET_BIQUAD_T_B2 = 0x000000;
1360 struct BIQUAD_T_ENABLE {
1361 static constexpr uint16_t ADDRESS = 0x0EB;
1365 uint32_t ENABLE : 1;
1369 static constexpr uint32_t RESET_BIQUAD_T_ENABLE = 0x0;
1388 struct VELOCITY_CONFIG {
1389 static constexpr uint16_t ADDRESS = 0x100;
1393 uint32_t SELECTION : 8;
1394 uint32_t METER_SYNC_PULSE : 1;
1395 uint32_t METER_TYPE : 2;
1397 uint32_t MOVING_AVRG_FILTER_SAMPLES : 3;
1417 struct VELOCITY_SCALING {
1418 static constexpr uint16_t ADDRESS = 0x101;
1422 int16_t VELOCITY_SCALING : 16;
1426 static constexpr int16_t RESET_VELOCITY_SCALING =
1447 struct V_MIN_POSDEV_TIME {
1448 static constexpr uint16_t ADDRESS = 0x102;
1452 uint32_t TIME_COUNTER_LIMIT : 16;
1454 uint32_t V_MIN_POS_DEV : 15;
1458 static constexpr uint32_t RESET_V_MIN_POS_DEV =
1460 static constexpr uint32_t RESET_TIME_COUNTER_LIMIT =
1477 struct MAX_VEL_DEVIATION {
1478 static constexpr uint16_t ADDRESS = 0x103;
1482 uint32_t MAX_VEL_DEVIATION : 31;
1486 static constexpr uint32_t RESET_MAX_VEL_DEVIATION =
1503 struct POSITION_CONFIG {
1504 static constexpr uint16_t ADDRESS = 0x120;
1527 struct MAX_POS_DEVIATION {
1528 static constexpr uint16_t ADDRESS = 0x121;
1532 uint32_t MAX_POS_ERR : 31;
1568 struct RAMP_STATUS {
1569 static constexpr uint16_t ADDRESS = 0x140;
1573 uint32_t STATUS_STOP_L : 1;
1574 uint32_t STATUS_STOP_R : 1;
1575 uint32_t STATUS_STOP_H : 1;
1576 uint32_t STATUS_LATCH_L : 1;
1577 uint32_t STATUS_LATCH_R : 1;
1578 uint32_t STATUS_LATCH_H : 1;
1579 uint32_t EVENT_STOP_L : 1;
1580 uint32_t EVENT_STOP_R : 1;
1581 uint32_t EVENT_STOP_H : 1;
1582 uint32_t EVENT_STOP_SG : 1;
1583 uint32_t EVENT_POS_REACHED : 1;
1584 uint32_t VELOCITY_REACHED : 1;
1585 uint32_t POSITION_REACHED : 1;
1586 uint32_t V_ZERO : 1;
1587 uint32_t T_ZEROWAIT_ACTIVE : 1;
1588 uint32_t SECOND_MOVE : 1;
1589 uint32_t STALL_IN_VEL_ERR : 1;
1590 uint32_t STALL_IN_POS_ERR : 1;
1610 static constexpr uint16_t ADDRESS = 0x141;
1611 uint32_t RAMPER_A1 : 23;
1629 static constexpr uint16_t ADDRESS = 0x142;
1630 uint32_t RAMPER_A2 : 23;
1648 static constexpr uint16_t ADDRESS = 0x143;
1649 uint32_t RAMPER_A_MAX : 23;
1667 static constexpr uint16_t ADDRESS = 0x144;
1668 uint32_t RAMPER_D1 : 23;
1686 static constexpr uint16_t ADDRESS = 0x145;
1687 uint32_t RAMPER_D2 : 23;
1705 static constexpr uint16_t ADDRESS = 0x146;
1706 uint32_t RAMPER_D_MAX : 23;
1723 struct RAMP_V_START {
1724 static constexpr uint16_t ADDRESS = 0x147;
1725 uint32_t RAMPER_V_START : 23;
1744 static constexpr uint16_t ADDRESS = 0x148;
1745 uint32_t RAMPER_V1 : 27;
1764 static constexpr uint16_t ADDRESS = 0x149;
1765 uint32_t RAMPER_V2 : 27;
1783 struct RAMP_V_STOP {
1784 static constexpr uint16_t ADDRESS = 0x14A;
1785 uint32_t RAMPER_V_STOP : 23;
1803 static constexpr uint16_t ADDRESS = 0x14B;
1804 uint32_t RAMPER_V_MAX : 27;
1821 struct RAMP_V_TARGET {
1822 static constexpr uint16_t ADDRESS = 0x14C;
1823 int32_t RAMPER_V_TARGET : 28;
1864 struct RAMP_SWITCH_MODE {
1865 static constexpr uint16_t ADDRESS = 0x14D;
1869 uint32_t STOP_L_ENABLE : 1;
1870 uint32_t STOP_R_ENABLE : 1;
1871 uint32_t STOP_H_ENABLE : 1;
1872 uint32_t STOP_L_POL : 1;
1873 uint32_t STOP_R_POL : 1;
1874 uint32_t STOP_H_POL : 1;
1875 uint32_t SWAP_LR : 1;
1876 uint32_t LATCH_L_ACTIVE : 1;
1877 uint32_t LATCH_L_INACTIVE : 1;
1878 uint32_t LATCH_R_ACTIVE : 1;
1879 uint32_t LATCH_R_INACTIVE : 1;
1880 uint32_t LATCH_H_ACTIVE : 1;
1881 uint32_t LATCH_H_INACTIVE : 1;
1882 uint32_t SG_STOP_ENABLE : 1;
1883 uint32_t SOFTSTOP_ENABLE : 1;
1884 uint32_t SW_HARD_STOP : 1;
1885 uint32_t STOP_ON_POS_DEVIATION : 1;
1886 uint32_t STOP_ON_VEL_DEVIATION : 1;
1887 uint32_t VELOCITY_OVERWRITE : 1;
1907 struct RAMP_TIME_CONFIG {
1908 static constexpr uint16_t ADDRESS = 0x14E;
1912 uint16_t T_VMAX : 16;
1914 uint16_t T_ZEROWAIT : 16;
1918 static constexpr uint32_t RESET_T_VMAX = 0x0000;
1919 static constexpr uint32_t RESET_T_ZEROWAIT = 0x0000;
1935 struct RAMP_A_ACTUAL {
1936 static constexpr uint16_t ADDRESS = 0x14F;
1940 int32_t A_ACTUAL : 24;
1944 static constexpr int32_t RESET_RAMPER_A_ACTUAL =
1961 struct RAMP_X_ACTUAL {
1962 static constexpr uint16_t ADDRESS = 0x150;
1964 static constexpr int32_t RESET_RAMPER_X_ACTUAL =
1981 struct RAMP_V_ACTUAL {
1982 static constexpr uint16_t ADDRESS = 0x151;
1986 int32_t RAMPER_V_ACTUAL : 28;
2005 struct RAMP_X_TARGET {
2006 static constexpr uint16_t ADDRESS = 0x152;
2007 int32_t RAMPER_X_TARGET;
2025 static constexpr uint16_t ADDRESS = 0x153;
2029 int16_t RAMPER_PHI_E;
2049 struct RAMP_ACC_FF {
2050 static constexpr uint16_t ADDRESS = 0x155;
2074 struct RAMP_X_ACTUAL_LATCH {
2075 static constexpr uint16_t ADDRESS = 0x156;
2076 int32_t RAMPER_X_ACTUAL_LATCH;
2093 struct POSITION_ACTUAL_LATCH {
2094 static constexpr uint16_t ADDRESS = 0x157;
2095 int32_t POSITION_ACTUAL_LATCH;
2112 struct PRBS_AMPLITUDE {
2113 static constexpr uint16_t ADDRESS = 0x160;
2117 int32_t PRBS_AMPLITUDE : 32;
2120 static constexpr int32_t RESET_PRBS_AMPLITUDE = 0x00000000;
2136 struct PRBS_DOWNSAMPLING_RATIO {
2137 static constexpr uint16_t ADDRESS = 0x161;
2141 uint8_t PRBS_DOWN_SAMPLING_RATIO : 8;
2145 static constexpr uint8_t RESET_PRBS_DOWNSAMPLING_RATIO = 0x00;
2171 static constexpr uint16_t ADDRESS = 0x180;
2176 KEEP_POS_TARGET : 1;
2177 uint32_t CURRENT_NORM_P : 1;
2178 uint32_t CURRENT_NORM_I : 1;
2179 uint32_t VELOCITY_NORM_P : 2;
2180 uint32_t VELOCITY_NORM_I : 2;
2181 uint32_t POSITION_NORM_P : 2;
2182 uint32_t POSITION_NORM_I : 2;
2183 uint32_t VEL_SCALE : 4;
2184 uint32_t POS_SMPL : 7;
2185 uint32_t VEL_SMPL : 7;
2189 static constexpr uint32_t RESET_PID_CONFIG = 0x00000800;
2206 struct PID_FLUX_COEFF {
2207 static constexpr uint16_t ADDRESS = 0x181;
2231 struct PID_TORQUE_COEFF {
2232 static constexpr uint16_t ADDRESS = 0x182;
2256 struct PID_FIELDWEAK_COEFF {
2257 static constexpr uint16_t ADDRESS = 0x183;
2280 struct PID_U_S_MAX {
2281 static constexpr uint16_t ADDRESS = 0x184;
2300 struct PID_VELOCITY_COEFF {
2301 static constexpr uint16_t ADDRESS = 0x185;
2325 struct PID_POSITION_COEFF {
2326 static constexpr uint16_t ADDRESS = 0x186;
2334 static constexpr int16_t RESET_P = 0x0000;
2335 static constexpr int16_t RESET_I = 0x0000;
2352 struct PID_POSITION_TOLERANCE {
2353 static constexpr uint16_t ADDRESS = 0x187;
2357 uint32_t PID_POSITION_TOLERANCE : 31;
2361 static constexpr uint32_t RESET_PID_POSITION_TOLERANCE = 0x0000000;
2378 struct PID_POSITION_TOLERANCE_DELAY {
2379 static constexpr uint16_t ADDRESS = 0x188;
2383 uint16_t PID_POSITION_TOLERANCE_DELAY;
2387 static constexpr uint16_t RESET_PID_POSITION_TOLERANCE_DELAY = 0x0000;
2403 struct PID_UQ_UD_LIMITS {
2404 static constexpr uint16_t ADDRESS = 0x189;
2408 uint16_t PID_UQ_UD_LIMITS;
2412 static constexpr uint16_t RESET_PID_UQ_UD_LIMITS = 0x5A81;
2429 struct PID_TORQUE_FLUX_LIMITS {
2430 static constexpr uint16_t ADDRESS = 0x18A;
2434 uint32_t PID_TORQUE_LIMIT : 15;
2436 uint32_t PID_FLUX_LIMIT : 15;
2455 struct PID_VELOCITY_LIMIT {
2456 static constexpr uint16_t ADDRESS = 0x18B;
2457 uint32_t PID_VELOCITY_LIMIT : 31;
2474 struct PID_POSITION_LIMIT_LOW {
2475 static constexpr uint16_t ADDRESS = 0x18C;
2476 int32_t PID_POSITION_LIMIT_LOW;
2492 struct PID_POSITION_LIMIT_HIGH {
2493 static constexpr uint16_t ADDRESS = 0x18D;
2494 int32_t PID_POSITION_LIMIT_HIGH;
2511 struct PID_TORQUE_FLUX_TARGET {
2512 static constexpr uint16_t ADDRESS = 0x18E;
2516 int16_t PID_TORQUE_TARGET;
2517 int16_t PID_FLUX_TARGET;
2536 struct PID_TORQUE_FLUX_OFFSET {
2537 static constexpr uint16_t ADDRESS = 0x18F;
2541 int16_t PID_TORQUE_OFFSET;
2542 int16_t PID_FLUX_OFFSET;
2560 struct PID_VELOCITY_TARGET {
2561 static constexpr uint16_t ADDRESS = 0x190;
2562 int32_t PID_VELOCITY_TARGET;
2578 struct PID_VELOCITY_OFFSET {
2579 static constexpr uint16_t ADDRESS = 0x191;
2580 int32_t PID_VELOCITY_OFFSET;
2596 struct PID_POSITION_TARGET {
2597 static constexpr uint16_t ADDRESS = 0x192;
2598 int32_t PID_POSITION_TARGET;
2615 struct PID_TORQUE_FLUX_ACTUAL {
2616 static constexpr uint16_t ADDRESS = 0x193;
2620 int16_t PID_TORQUE_ACTUAL;
2621 int16_t PID_FLUX_ACTUAL;
2639 struct PID_VELOCITY_ACTUAL {
2640 static constexpr uint16_t ADDRESS = 0x194;
2641 int32_t PID_VELOCITY_ACTUAL;
2657 struct PID_POSITION_ACTUAL {
2658 static constexpr uint16_t ADDRESS = 0x195;
2659 int32_t PID_POSITION_ACTUAL;
2675 struct PID_POSITION_ACTUAL_OFFSET {
2676 static constexpr uint16_t ADDRESS = 0x196;
2677 int32_t PID_POSITION_ACTUAL_OFFSET;
2693 struct PID_TORQUE_ERROR {
2694 static constexpr uint16_t ADDRESS = 0x197;
2695 int16_t PID_TORQUE_ERROR;
2711 struct PID_FLUX_ERROR {
2712 static constexpr uint16_t ADDRESS = 0x198;
2713 int16_t PID_FLUX_ERROR;
2729 struct PID_VELOCITY_ERROR {
2730 static constexpr uint16_t ADDRESS = 0x199;
2731 int32_t PID_VELOCITY_ERROR;
2747 struct PID_POSITION_ERROR {
2748 static constexpr uint16_t ADDRESS = 0x19A;
2749 int32_t PID_POSITION_ERROR;
2765 struct PID_TORQUE_INTEGRATOR {
2766 static constexpr uint16_t ADDRESS = 0x19B;
2767 int32_t PID_TORQUE_INTEGRATOR;
2783 struct PID_FLUX_INTEGRATOR {
2784 static constexpr uint16_t ADDRESS = 0x19C;
2785 int32_t PID_FLUX_INTEGRATOR;
2801 struct PID_VELOCITY_INTEGRATOR {
2802 static constexpr uint16_t ADDRESS = 0x19D;
2803 int32_t PID_VELOCITY_INTEGRATOR;
2819 struct PID_POSITION_INTEGRATOR {
2820 static constexpr uint16_t ADDRESS = 0x19E;
2821 int32_t PID_POSITION_INTEGRATOR;
2838 struct PIDIN_TORQUE_FLUX_TARGET {
2839 static constexpr uint16_t ADDRESS = 0x1A0;
2843 int16_t PIDIN_TORQUE_TARGET;
2844 int16_t PIDIN_FLUX_TARGET;
2862 struct PIDIN_VELOCITY_TARGET {
2863 static constexpr uint16_t ADDRESS = 0x1A1;
2864 int32_t PIDIN_VELOCITY_TARGET;
2880 struct PIDIN_POSITION_TARGET {
2881 static constexpr uint16_t ADDRESS = 0x1A2;
2882 int32_t PIDIN_POSITION_TARGET;
2899 struct PIDIN_TORQUE_FLUX_TARGET_LIMITED {
2900 static constexpr uint16_t ADDRESS = 0x1A3;
2904 int16_t PIDIN_TORQUE_TARGET_LIMITED;
2905 int16_t PIDIN_FLUX_TARGET_LIMITED;
2923 struct PIDIN_VELOCITY_TARGET_LIMITED {
2924 static constexpr uint16_t ADDRESS = 0x1A4;
2925 int32_t PIDIN_VELOCITY_TARGET_LIMITED;
2941 struct PIDIN_POSITION_TARGET_LIMITED {
2942 static constexpr uint16_t ADDRESS = 0x1A5;
2943 int32_t PIDIN_POSITION_TARGET_LIMITED;
2960 struct FOC_IBETA_IALPHA {
2961 static constexpr uint16_t ADDRESS = 0x1A6;
2986 static constexpr uint16_t ADDRESS = 0x1A7;
3011 static constexpr uint16_t ADDRESS = 0x1A8;
3035 struct FOC_UQ_UD_LIMITED {
3036 static constexpr uint16_t ADDRESS = 0x1A9;
3060 struct FOC_UBETA_UALPHA {
3061 static constexpr uint16_t ADDRESS = 0x1AA;
3085 struct FOC_UWY_UUX {
3086 static constexpr uint16_t ADDRESS = 0x1AB;
3110 static constexpr uint16_t ADDRESS = 0x1AC;
3128 struct PWM_VX2_UX1 {
3129 static constexpr uint16_t ADDRESS = 0x1AD;
3154 static constexpr uint16_t ADDRESS = 0x1AE;
3177 struct VELOCITY_FRQ {
3178 static constexpr uint16_t ADDRESS = 0x1AF;
3179 int32_t VELOCITY_FRQ;
3195 struct VELOCITY_PER {
3196 static constexpr uint16_t ADDRESS = 0x1B0;
3197 int32_t VELOCITY_PER_VAL;
3215 struct U_S_ACTUAL_I_S_ACTUAL {
3216 static constexpr uint16_t ADDRESS = 0x1C0;
3220 uint16_t U_S_ACTUAL;
3221 uint16_t I_S_ACTUAL;
3240 static constexpr uint16_t ADDRESS = 0x1C1;
3270 static constexpr uint16_t ADDRESS = 0x1C2;
3278 uint32_t HALL_U : 1;
3279 uint32_t HALL_V : 1;
3280 uint32_t HALL_W : 1;
3282 uint32_t REF_SW_R : 1;
3283 uint32_t REF_SW_L : 1;
3284 uint32_t REF_SW_H : 1;
3287 uint32_t HALL_U_FILT : 1;
3288 uint32_t HALL_V_FILT : 1;
3289 uint32_t HALL_W_FILT : 1;
3315 struct OUTPUTS_RAW {
3316 static constexpr uint16_t ADDRESS = 0x1C3;
3320 uint32_t PWM_UX1_L : 1;
3321 uint32_t PWM_UX1_H : 1;
3322 uint32_t PWM_VX2_L : 1;
3323 uint32_t PWM_VX2_H : 1;
3324 uint32_t PWM_WY1_L : 1;
3325 uint32_t PWM_WY1_H : 1;
3326 uint32_t PWM_Y2_L : 1;
3327 uint32_t PWM_Y2_H : 1;
3366 struct STATUS_FLAGS {
3367 static constexpr uint16_t ADDRESS = 0x1C4;
3371 uint32_t PID_X_TARGET_LIMIT : 1;
3372 uint32_t PID_X_OUTPUT_LIMIT : 1;
3373 uint32_t PID_V_TARGET_LIMIT : 1;
3374 uint32_t PID_V_OUTPUT_LIMIT : 1;
3375 uint32_t PID_ID_TARGET_LIMIT : 1;
3376 uint32_t PID_ID_OUTPUT_LIMIT : 1;
3377 uint32_t PID_IQ_TARGET_LIMIT : 1;
3378 uint32_t PID_IQ_OUTPUT_LIMIT : 1;
3379 uint32_t IPARK_VOLTLIM_LIMIT_U : 1;
3381 uint32_t PWM_SWITCH_LIMIT_ACTIVE : 1;
3382 uint32_t HALL_ERROR : 1;
3383 uint32_t POSITION_TRACKING_ERROR : 1;
3385 uint32_t VELOCITY_TRACKING_ERROR : 1;
3387 uint32_t PID_FW_OUTPUT_LIMIT : 1;
3391 uint32_t REF_SW_L : 1;
3392 uint32_t REF_SW_R : 1;
3393 uint32_t REF_SW_H : 1;
3394 uint32_t POSITION_REACHED : 1;
3396 uint32_t ADC_I_CLIPPED : 1;
3420 static constexpr uint16_t ADDRESS = 0x1E3;
3421 enum class BridgeEnable : uint8_t {
3428 BridgeEnable BRIDGE_ENABLE_U : 1;
3429 BridgeEnable BRIDGE_ENABLE_V : 1;
3455 static constexpr uint16_t ADDRESS = 0x1E4;
3458 enum class VsUvloLevel : uint8_t {
3478 enum class GateSourceCurrent : uint8_t {
3498 enum class GateSinkCurrent : uint8_t {
3520 GateSinkCurrent IGATE_SINK_UVW : 4;
3521 GateSourceCurrent IGATE_SOURCE_UVW : 4;
3522 GateSinkCurrent IGATE_SINK_Y2 : 4;
3523 GateSourceCurrent IGATE_SOURCE_Y2 : 4;
3524 uint32_t ADAPTIVE_MODE_UVW : 1;
3525 uint32_t ADAPTIVE_MODE_Y2 : 1;
3527 VsUvloLevel VS_UVLO_LVL : 4;
3550 static constexpr uint16_t ADDRESS = 0x1E9;
3554 uint8_t T_DRIVE_SINK_UVW;
3555 uint8_t T_DRIVE_SOURCE_UVW;
3556 uint8_t T_DRIVE_SINK_Y2;
3557 uint8_t T_DRIVE_SOURCE_Y2;
3579 static constexpr uint16_t ADDRESS = 0x1EA;
3614 static constexpr uint16_t ADDRESS = 0x1EB;
3617 enum class TermPwmOnShort : uint8_t {
3623 enum class RetryCount : uint8_t {
3631 enum class VgsBlanking : uint8_t {
3639 enum class VgsDeglitch : uint8_t {
3653 VgsDeglitch VGS_DEGLITCH_UVW : 3;
3654 VgsBlanking VGS_BLANKING_UVW : 2;
3656 VgsDeglitch VGS_DEGLITCH_Y2 : 3;
3657 VgsBlanking VGS_BLANKING_Y2 : 2;
3659 RetryCount LS_RETRIES_UVW : 2;
3660 RetryCount HS_RETRIES_UVW : 2;
3661 RetryCount LS_RETRIES_Y2 : 2;
3662 RetryCount HS_RETRIES_Y2 : 2;
3664 TermPwmOnShort TERM_PWM_ON_SHORT : 1;
3690 static constexpr uint16_t ADDRESS = 0x1EC;
3693 enum class OcpThreshold : uint8_t {
3713 enum class BlankingTime : uint8_t {
3725 enum class DeglitchTime : uint8_t {
3739 DeglitchTime LS_OCP_DEGLITCH_UVW : 3;
3740 BlankingTime LS_OCP_BLANKING_UVW : 3;
3742 OcpThreshold LS_OCP_THRES_UVW : 4;
3744 uint32_t LS_OCP_USE_VDS_UVW : 1;
3746 DeglitchTime HS_OCP_DEGLITCH_UVW : 3;
3747 BlankingTime HS_OCP_BLANKING_UVW : 3;
3749 OcpThreshold HS_OCP_THRES_UVW : 4;
3775 static constexpr uint16_t ADDRESS = 0x1ED;
3778 enum class OcpThreshold : uint8_t {
3798 enum class BlankingTime : uint8_t {
3810 enum class DeglitchTime : uint8_t {
3824 DeglitchTime LS_OCP_DEGLITCH_Y2 : 3;
3825 BlankingTime LS_OCP_BLANKING_Y2 : 3;
3827 OcpThreshold LS_OCP_THRES_Y2 : 4;
3829 uint32_t LS_OCP_USE_VDS_Y2 : 1;
3831 DeglitchTime HS_OCP_DEGLITCH_Y2 : 3;
3832 BlankingTime HS_OCP_BLANKING_Y2 : 3;
3834 OcpThreshold HS_OCP_THRES_Y2 : 4;
3893 struct PROT_ENABLE {
3894 static constexpr uint16_t ADDRESS = 0x1EE;
3899 LS_SHORT_PROT_U : 1;
3901 LS_SHORT_PROT_V : 1;
3903 LS_SHORT_PROT_W : 1;
3904 uint32_t LS_SHORT_PROT_Y2 : 1;
3906 uint32_t LS_VGS_OFF_SHORT_PROT_U : 1;
3908 uint32_t LS_VGS_OFF_SHORT_PROT_V : 1;
3910 uint32_t LS_VGS_OFF_SHORT_PROT_W : 1;
3912 uint32_t LS_VGS_OFF_SHORT_PROT_Y2 : 1;
3914 uint32_t LS_VGS_ON_SHORT_PROT_U : 1;
3916 uint32_t LS_VGS_ON_SHORT_PROT_V : 1;
3918 uint32_t LS_VGS_ON_SHORT_PROT_W : 1;
3920 uint32_t LS_VGS_ON_SHORT_PROT_Y2 : 1;
3922 uint32_t BST_UVLO_PROT_U : 1;
3924 uint32_t BST_UVLO_PROT_V : 1;
3926 uint32_t BST_UVLO_PROT_W : 1;
3928 uint32_t BST_UVLO_PROT_Y2 : 1;
3931 HS_SHORT_PROT_U : 1;
3933 HS_SHORT_PROT_V : 1;
3935 HS_SHORT_PROT_W : 1;
3936 uint32_t HS_SHORT_PROT_Y2 : 1;
3938 uint32_t HS_VGS_OFF_SHORT_PROT_U : 1;
3940 uint32_t HS_VGS_OFF_SHORT_PROT_V : 1;
3942 uint32_t HS_VGS_OFF_SHORT_PROT_W : 1;
3944 uint32_t HS_VGS_OFF_SHORT_PROT_Y2 : 1;
3946 uint32_t HS_VGS_ON_SHORT_PROT_U : 1;
3948 uint32_t HS_VGS_ON_SHORT_PROT_V : 1;
3950 uint32_t HS_VGS_ON_SHORT_PROT_W : 1;
3952 uint32_t HS_VGS_ON_SHORT_PROT_Y2 : 1;
3954 uint32_t VDRV_UVLO_PROT : 1;
3956 uint32_t VS_UVLO_PROT : 1;
4011 struct STATUS_INT_ENABLE {
4012 static constexpr uint16_t ADDRESS = 0x1EF;
4016 uint32_t LS_SHORT_EN_U : 1;
4017 uint32_t LS_SHORT_EN_V : 1;
4018 uint32_t LS_SHORT_EN_W : 1;
4019 uint32_t LS_SHORT_EN_Y2 : 1;
4020 uint32_t LS_VGS_OFF_SHORT_EN_U : 1;
4022 uint32_t LS_VGS_OFF_SHORT_EN_V : 1;
4024 uint32_t LS_VGS_OFF_SHORT_EN_W : 1;
4026 uint32_t LS_VGS_OFF_SHORT_EN_Y2 : 1;
4028 uint32_t LS_VGS_ON_SHORT_EN_U : 1;
4030 uint32_t LS_VGS_ON_SHORT_EN_V : 1;
4032 uint32_t LS_VGS_ON_SHORT_EN_W : 1;
4034 uint32_t LS_VGS_ON_SHORT_EN_Y2 : 1;
4044 uint32_t HS_SHORT_EN_U : 1;
4045 uint32_t HS_SHORT_EN_V : 1;
4046 uint32_t HS_SHORT_EN_W : 1;
4047 uint32_t HS_SHORT_EN_Y2 : 1;
4048 uint32_t HS_VGS_OFF_SHORT_EN_U : 1;
4050 uint32_t HS_VGS_OFF_SHORT_EN_V : 1;
4052 uint32_t HS_VGS_OFF_SHORT_EN_W : 1;
4054 uint32_t HS_VGS_OFF_SHORT_EN_Y2 : 1;
4056 uint32_t HS_VGS_ON_SHORT_EN_U : 1;
4058 uint32_t HS_VGS_ON_SHORT_EN_V : 1;
4060 uint32_t HS_VGS_ON_SHORT_EN_W : 1;
4062 uint32_t HS_VGS_ON_SHORT_EN_Y2 : 1;
4064 uint32_t VDRV_UVLO_EN : 1;
4065 uint32_t VDRV_UVLWRN_EN : 1;
4066 uint32_t VS_UVLO_EN : 1;
4116 static constexpr uint16_t ADDRESS = 0x1F0;
4120 uint32_t LS_SHORT_U : 1;
4121 uint32_t LS_SHORT_V : 1;
4122 uint32_t LS_SHORT_W : 1;
4123 uint32_t LS_SHORT_Y2 : 1;
4124 uint32_t LS_VGS_OFF_SHORT_U : 1;
4125 uint32_t LS_VGS_OFF_SHORT_V : 1;
4126 uint32_t LS_VGS_OFF_SHORT_W : 1;
4127 uint32_t LS_VGS_OFF_SHORT_Y2 : 1;
4128 uint32_t LS_VGS_ON_SHORT_U : 1;
4129 uint32_t LS_VGS_ON_SHORT_V : 1;
4130 uint32_t LS_VGS_ON_SHORT_W : 1;
4131 uint32_t LS_VGS_ON_SHORT_Y2 : 1;
4132 uint32_t BST_UVLO_U : 1;
4133 uint32_t BST_UVLO_V : 1;
4134 uint32_t BST_UVLO_W : 1;
4135 uint32_t BST_UVLO_Y2 : 1;
4136 uint32_t HS_SHORT_U : 1;
4137 uint32_t HS_SHORT_V : 1;
4138 uint32_t HS_SHORT_W : 1;
4139 uint32_t HS_SHORT_Y2 : 1;
4140 uint32_t HS_VGS_OFF_SHORT_U : 1;
4141 uint32_t HS_VGS_OFF_SHORT_V : 1;
4142 uint32_t HS_VGS_OFF_SHORT_W : 1;
4143 uint32_t HS_VGS_OFF_SHORT_Y2 : 1;
4144 uint32_t HS_VGS_ON_SHORT_U : 1;
4145 uint32_t HS_VGS_ON_SHORT_V : 1;
4146 uint32_t HS_VGS_ON_SHORT_W : 1;
4147 uint32_t HS_VGS_ON_SHORT_Y2 : 1;
4148 uint32_t VDRV_UVLO : 1;
4149 uint32_t VDRV_UVLWRN : 1;
4150 uint32_t VS_UVLO : 1;
4186 static constexpr uint16_t ADDRESS = 0x1F1;
4190 uint32_t LS_FAULT_ACTIVE_U : 1;
4191 uint32_t LS_FAULT_ACTIVE_V : 1;
4192 uint32_t LS_FAULT_ACTIVE_W : 1;
4193 uint32_t LS_FAULT_ACTIVE_Y2 : 1;
4195 uint32_t BST_UVLO_STS_U : 1;
4196 uint32_t BST_UVLO_STS_V : 1;
4197 uint32_t BST_UVLO_STS_W : 1;
4198 uint32_t BST_UVLO_STS_Y2 : 1;
4199 uint32_t HS_FAULT_ACTIVE_U : 1;
4200 uint32_t HS_FAULT_ACTIVE_V : 1;
4201 uint32_t HS_FAULT_ACTIVE_W : 1;
4202 uint32_t HS_FAULT_ACTIVE_Y2 : 1;
4204 uint32_t VDRV_UVLO_STS : 1;
4205 uint32_t VDRV_UVLWRN_STS : 1;
4206 uint32_t VS_UVLO_STS : 1;
4225 struct ADC_I1_I0_EXT {
4226 static constexpr uint16_t ADDRESS = 0x200;
4250 static constexpr uint16_t ADDRESS = 0x201;
4274 struct PWM_VX2_UX1_EXT {
4275 static constexpr uint16_t ADDRESS = 0x202;
4299 struct PWM_Y2_WY1_EXT {
4300 static constexpr uint16_t ADDRESS = 0x203;
4323 struct PWM_EXT_Y2_ALT {
4324 static constexpr uint16_t ADDRESS = 0x204;
4328 uint16_t Y2_ALT : 16;
4349 struct VOLTAGE_EXT {
4350 static constexpr uint16_t ADDRESS = 0x205;
4375 static constexpr uint16_t ADDRESS = 0x206;
4398 struct VELOCITY_EXT {
4399 static constexpr uint16_t ADDRESS = 0x208;
4403 int32_t VELOCITY_EXT;
@ Disabled
LDO output disabled.
Definition bootloader_config.hpp:9
@ CONFIG
Configuration memory (runtime reconfiguration)