103 #define DRV8323_ADDR_MASK (0x7800) 106 #define DRV8323_DATA_MASK (0x07FF) 109 #define DRV8323_RW_MASK (0x8000) 112 #define DRV8323_REG_0 0x00 114 #define DRV8323_REG_1 0x01 116 #define DRV8323_REG_2 0x02 118 #define DRV8323_REG_3 0x03 120 #define DRV8323_REG_4 0x04 122 #define DRV8323_REG_5 0x05 124 #define DRV8323_REG_6 0x06 127 #define DRV8323_FAULT_TYPE_MASK (0x07FF) 130 #define DRV8323_STATUS00_VDS_LC_BITS (1 << 0) 132 #define DRV8323_STATUS00_VDS_HC_BITS (1 << 1) 134 #define DRV8323_STATUS00_VDS_LB_BITS (1 << 2) 136 #define DRV8323_STATUS00_VDS_HB_BITS (1 << 3) 138 #define DRV8323_STATUS00_VDS_LA_BITS (1 << 4) 140 #define DRV8323_STATUS00_VDS_HA_BITS (1 << 5) 142 #define DRV8323_STATUS00_OTSD_BITS (1 << 6) 144 #define DRV8323_STATUS00_UVLO_BITS (1 << 7) 146 #define DRV8323_STATUS00_GDF_BITS (1 << 8) 148 #define DRV8323_STATUS00_VDS_OCP_BITS (1 << 9) 150 #define DRV8323_STATUS00_FAULT_BITS (1 << 10) 154 #define DRV8323_STATUS01_VGS_LC_BITS (1 << 0) 157 #define DRV8323_STATUS01_VGS_HC_BITS (1 << 1) 160 #define DRV8323_STATUS01_VGS_LB_BITS (1 << 2) 163 #define DRV8323_STATUS01_VGS_HB_BITS (1 << 3) 166 #define DRV8323_STATUS01_VGS_LA_BITS (1 << 4) 169 #define DRV8323_STATUS01_VGS_HA_BITS (1 << 5) 172 #define DRV8323_STATUS01_CPUV_BITS (1 << 6) 175 #define DRV8323_STATUS01_OTW_BITS (1 << 7) 178 #define DRV8323_STATUS01_SC_OC_BITS (1 << 8) 181 #define DRV8323_STATUS01_SB_OC_BITS (1 << 9) 184 #define DRV8323_STATUS01_SA_OC_BITS (1 << 10) 189 #define DRV8323_CTRL02_CLR_FLT_BITS (1 << 0) 192 #define DRV8323_CTRL02_BRAKE_BITS (1 << 1) 195 #define DRV8323_CTRL02_COAST_BITS (1 << 2) 198 #define DRV8323_CTRL02_PWM1_DIR_BITS (1 << 3) 201 #define DRV8323_CTRL02_PWM1_COM_BITS (1 << 4) 204 #define DRV8323_CTRL02_PWM_MODE_BITS (3 << 5) 207 #define DRV8323_CTRL02_OTW_REP_BITS (1 << 7) 210 #define DRV8323_CTRL02_DIS_GDF_BITS (1 << 8) 213 #define DRV8323_CTRL02_DIS_CPUV_BITS (1 << 9) 216 #define DRV8323_CTRL02_RESERVED1_BITS (1 << 10) 220 #define DRV8323_CTRL03_IDRIVEN_HS_BITS (15 << 0) 223 #define DRV8323_CTRL03_IDRIVEP_HS_BITS (15 << 4) 226 #define DRV8323_CTRL03_LOCK_BITS (7 << 8) 229 #define DRV8323_CTRL04_IDRIVEN_LS_BITS (15 << 0) 232 #define DRV8323_CTRL04_IDRIVEP_LS_BITS (15 << 4) 235 #define DRV8323_CTRL04_TDRIVE_BITS (3 << 8) 238 #define DRV8323_CTRL04_CBC_BITS (1 << 10) 242 #define DRV8323_CTRL05_VDS_LVL_BITS (15 << 0) 245 #define DRV8323_CTRL05_OCP_DEG_BITS (3 << 4) 248 #define DRV8323_CTRL05_OCP_MODE_BITS (3 << 6) 251 #define DRV8323_CTRL05_DEAD_TIME_BITS (3 << 8) 254 #define DRV8323_CTRL05_TRETRY_BITS (1 << 10) 258 #define DRV8323_CTRL06_SEN_LVL_BITS (3 << 0) 261 #define DRV8323_CTRL06_CSA_CAL_C_BITS (1 << 2) 264 #define DRV8323_CTRL06_CSA_CAL_B_BITS (1 << 3) 267 #define DRV8323_CTRL06_CSA_CAL_A_BITS (1 << 4) 270 #define DRV8323_CTRL06_DIS_SEN_BITS (1 << 5) 273 #define DRV8323_CTRL06_CSA_GAIN_BITS (3 << 6) 276 #define DRV8323_CTRL06_LS_REF_BITS (1 << 8) 279 #define DRV8323_CTRL06_VREF_DIV_BITS (1 << 9) 282 #define DRV8323_CTRL06_CSA_FET_BITS (1 << 10) 287 #define DRV8323_OTW_REP_POS 7 289 #define DRV8323_DIS_GDF_POS 8 291 #define DRV8323_DIS_CPUV_POS 9 294 #define DRV8323_IDRIVEN_HS_POS 0 296 #define DRV8323_IDRIVEP_HS_POS 4 299 #define DRV8323_IDRIVEN_LS_POS 0 301 #define DRV8323_IDRIVEP_LS_POS 4 303 #define DRV8323_TDRIVE_POS 8 305 #define DRV8323_CBC_POS 10 308 #define DRV8323_VDS_LVL_POS 0 310 #define DRV8323_OCP_DEG_POS 4 312 #define DRV8323_OCP_MODE_POS 6 314 #define DRV8323_DEAD_TIME_POS 8 316 #define DRV8323_TRETRY_POS 10 319 #define DRV8323_SEN_LVL_POS 0 321 #define DRV8323_DIS_SEN_POS 5 323 #define DRV8323_CSA_GAIN_POS 6 325 #define DRV8323_LS_REF_POS 8 327 #define DRV8323_VREF_DIV_POS 9 329 #define DRV8323_CSA_FET_POS 10 336 CtrlMode_Read = 1 << 15,
338 CtrlMode_Write = 0 << 15
339 } DRV8323_CtrlMode_e;
366 } DRV8323_STATUS00_WarningWatchdog_e;
394 } DRV8323_STATUS01_OvVdsFaults_e;
401 PwmMode_6 = (0 << 5),
403 PwmMode_3 = (1 << 5),
406 } DRV8323_CTRL02_PwmMode_e;
413 ISour_HS_0p010_A = (0 << 4),
415 ISour_HS_0p020_A = (1 << 4),
417 ISour_HS_0p030_A = (2 << 4),
419 ISour_HS_0p040_A = (3 << 4),
421 ISour_HS_0p050_A = (4 << 4),
423 ISour_HS_0p060_A = (5 << 4),
425 ISour_HS_0p070_A = (6 << 4),
427 ISour_HS_0p125_A = (7 << 4),
429 ISour_HS_0p250_A = (8 << 4),
431 ISour_HS_0p500_A = (9 << 4),
433 ISour_HS_0p750_A = (10 << 4),
435 ISour_HS_1p000_A = (11 << 4)
436 } DRV8323_CTRL03_PeakSourCurHS_e;
443 ISink_HS_0p020_A = (0 << 0),
445 ISink_HS_0p030_A = (1 << 0),
447 ISink_HS_0p040_A = (2 << 0),
449 ISink_HS_0p050_A = (3 << 0),
451 ISink_HS_0p060_A = (4 << 0),
453 ISink_HS_0p070_A = (5 << 0),
455 ISink_HS_0p125_A = (6 << 0),
457 ISink_HS_0p250_A = (7 << 0),
459 ISink_HS_0p500_A = (8 << 0),
461 ISink_HS_0p750_A = (9 << 0),
463 ISink_HS_1p000_A = (10 << 0),
465 ISink_HS_1p250_A = (11 << 0)
466 } DRV8323_CTRL03_PeakSinkCurHS_e;
473 Lock_lock = (6 << 8),
475 Lock_unlock = (3 << 8)
476 } DRV8323_CTRL03_Lock_e;
483 TSour_250_ns = (0 << 8),
485 TSour_500_ns = (1 << 8),
487 TSour_1000_ns = (2 << 8),
489 TSour_2000_ns = (3 << 8)
490 } DRV8323_CTRL04_PeakTime_e;
497 ISour_LS_0p010_A = (0 << 4),
499 ISour_LS_0p030_A = (1 << 4),
501 ISour_LS_0p060_A = (2 << 4),
503 ISour_LS_0p080_A = (3 << 4),
505 ISour_LS_0p120_A = (4 << 4),
507 ISour_LS_0p140_A = (5 << 4),
509 ISour_LS_0p170_A = (6 << 4),
511 ISour_LS_0p190_A = (7 << 4),
513 ISour_LS_0p250_A = (8 << 4),
515 ISour_LS_0p330_A = (9 << 4),
517 ISour_LS_0p370_A = (10 << 4),
519 ISour_LS_0p440_A = (11 << 4),
521 ISour_LS_0p570_A = (12 << 4),
523 ISour_LS_0p680_A = (13 << 4),
525 ISour_LS_0p820_A = (14 << 4),
527 ISour_LS_1p000_A = (15 << 4)
528 } DRV8323_CTRL04_PeakSourCurLS_e;
535 ISink_LS_0p020_A = (0 << 0),
537 ISink_LS_0p060_A = (1 << 0),
539 ISink_LS_0p120_A = (2 << 0),
541 ISink_LS_0p160_A = (3 << 0),
543 ISink_LS_0p240_A = (4 << 0),
545 ISink_LS_0p280_A = (5 << 0),
547 ISink_LS_0p340_A = (6 << 0),
549 ISink_LS_0p380_A = (7 << 0),
551 ISink_LS_0p520_A = (8 << 0),
553 ISink_LS_0p660_A = (9 << 0),
555 ISink_LS_0p740_A = (10 << 0),
557 ISink_LS_0p880_A = (11 << 0),
559 ISink_LS_1p140_A = (12 << 0),
561 ISink_LS_1p360_A = (13 << 0),
563 ISink_LS_1p640_A = (14 << 0),
565 ISink_LS_2p000_A = (15 << 0)
566 } DRV8323_CTRL04_PeakSinkCurLS_e;
573 VDS_Level_0p060_V = (0 << 0),
575 VDS_Level_0p130_V = (1 << 0),
577 VDS_Level_0p200_V = (2 << 0),
579 VDS_Level_0p260_V = (3 << 0),
581 VDS_Level_0p310_V = (4 << 0),
583 VDS_Level_0p450_V = (5 << 0),
585 VDS_Level_0p530_V = (6 << 0),
587 VDS_Level_0p600_V = (7 << 0),
589 VDS_Level_0p680_V = (8 << 0),
591 VDS_Level_0p750_V = (9 << 0),
593 VDS_Level_0p940_V = (10 << 0),
595 VDS_Level_1p130_V = (11 << 0),
597 VDS_Level_1p300_V = (12 << 0),
599 VDS_Level_1p500_V = (13 << 0),
601 VDS_Level_1p700_V = (14 << 0),
603 VDS_Level_1p880_V = (15 << 0)
604 } DRV8323_CTRL05_VDSLVL_e;
611 VDSDeg_0_us = (0 << 4),
613 VDSDeg_2_us = (1 << 4),
615 VDSDeg_4_us = (2 << 4),
617 VDSDeg_8_us = (3 << 4)
618 } DRV8323_CTRL05_OcpDeg_e;
625 Latched_Shutdown = (0 << 6),
627 Automatic_Retry = (1 << 6),
629 Report_Only = (2 << 6),
631 Disable_OCP = (3 << 6)
632 } DRV8323_CTRL05_OcpMode_e;
639 DeadTime_50_ns = (0 << 8),
641 DeadTime_100_ns = (1 << 8),
643 DeadTime_200_ns = (2 << 8),
645 DeadTime_400_ns = (3 << 8)
646 } DRV8323_CTRL05_DeadTime_e;
653 SEN_Lvl_Ocp_0p25 = (0 << 0),
655 SEN_Lvl_Ocp_0p50 = (1 << 0),
657 SEN_Lvl_Ocp_0p75 = (2 << 0),
659 SEN_Lvl_Ocp_1p00 = (3 << 0)
660 } DRV8323_CTRL06_SENLevel_e;
667 Gain_5VpV = (0 << 6),
669 Gain_10VpV = (1 << 6),
671 Gain_20VpV = (2 << 6),
673 Gain_40VpV = (3 << 6)
674 } DRV8323_CTRL06_CSAGain_e;
681 Address_Status_0 = 0 << 11,
683 Address_Status_1 = 1 << 11,
685 Address_Control_2 = 2 << 11,
687 Address_Control_3 = 3 << 11,
689 Address_Control_4 = 4 << 11,
691 Address_Control_5 = 5 << 11,
693 Address_Control_6 = 6 << 11
698 typedef struct _DRV_SPI_8323_Stat00_t_
722 }DRV_SPI_8323_Stat00_t_;
726 typedef struct _DRV_SPI_8323_Stat01_t_
750 }DRV_SPI_8323_Stat01_t_;
754 typedef struct _DRV_SPI_8323_Ctrl02_t_
767 DRV8323_CTRL02_PwmMode_e PWM_MODE;
776 }DRV_SPI_8323_Ctrl02_t_;
780 typedef struct _DRV_SPI_8323_Ctrl03_t_
783 DRV8323_CTRL03_PeakSinkCurHS_e IDRIVEN_HS;
785 DRV8323_CTRL03_PeakSourCurHS_e IDRIVEP_HS;
787 DRV8323_CTRL03_Lock_e LOCK;
788 }DRV_SPI_8323_Ctrl03_t_;
792 typedef struct _DRV_SPI_8323_Ctrl04_t_
795 DRV8323_CTRL04_PeakSinkCurLS_e IDRIVEN_LS;
797 DRV8323_CTRL04_PeakSourCurLS_e IDRIVEP_LS;
799 DRV8323_CTRL04_PeakTime_e TDRIVE;
802 }DRV_SPI_8323_Ctrl04_t_;
806 typedef struct _DRV_SPI_8323_Ctrl05_t_
809 DRV8323_CTRL05_VDSLVL_e VDS_LVL;
811 DRV8323_CTRL05_OcpDeg_e OCP_DEG;
813 DRV8323_CTRL05_OcpMode_e OCP_MODE;
815 DRV8323_CTRL05_DeadTime_e DEAD_TIME;
818 }DRV_SPI_8323_Ctrl05_t_;
822 typedef struct _DRV_SPI_8323_Ctrl06_t_
825 DRV8323_CTRL06_SENLevel_e SEN_LVL;
835 DRV8323_CTRL06_CSAGain_e CSA_GAIN;
842 }DRV_SPI_8323_Ctrl06_t_;
845 typedef struct _DRV_SPI_8323_Vars_t_
848 DRV_SPI_8323_Stat00_t_ Stat_Reg_00;
850 DRV_SPI_8323_Stat01_t_ Stat_Reg_01;
852 DRV_SPI_8323_Ctrl02_t_ Ctrl_Reg_02;
854 DRV_SPI_8323_Ctrl03_t_ Ctrl_Reg_03;
856 DRV_SPI_8323_Ctrl04_t_ Ctrl_Reg_04;
858 DRV_SPI_8323_Ctrl05_t_ Ctrl_Reg_05;
860 DRV_SPI_8323_Ctrl06_t_ Ctrl_Reg_06;
861 } DRV_SPI_8323_Vars_t;
865 typedef uint16_t DRV8323_Word_t;
909 }GATE_DRIVE_8323_CFG1_T;
954 }GATE_DRIVE_8323_CFG2_T;
976 #define GD1_REG6_MASK 0x07FF8000 979 #define GD1_REG6_POS 15 982 #define DRV_REG6_WRITE_PROTECT_MASK 0x61C 986 #define GD1_REG5_MASK 0x00007FF0 989 #define GD1_REG5_POS 4 992 #define DRV_REG5_WRITE_PROTECT_MASK 0x00000000 996 #define GD2_REG4_MASK 0x1FC00000 998 #define GD1_REG4_MASK 0x0000000F 1001 #define GD2_REG4_POS 22 1004 #define GD2_REG4_DRV_POS 4 1007 #define GD1_REG4_POS 0 1010 #define DRV_REG4_WRITE_PROTECT_MASK 0x00000400 1014 #define GD2_REG3_MASK 0x003FF800 1017 #define GD2_REG3_POS 11 1020 #define DRV_REG3_WRITE_PROTECT_MASK 0x00000700 1024 #define GD2_REG2_MASK 0x000007FF 1027 #define GD2_REG2_POS 0 1030 #define DRV_REG2_WRITE_PROTECT_MASK 0x47F 1036 #define GD_UVLO_FAULT_MASK 0x10000000 1038 #define GD_UVLO_FAULT_POS 28U 1041 #define GD_OTSD_FAULT_MASK 0x08000000 1043 #define GD_OTSD_FAULT_POS 27U