This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

在28379D平台上做伺服驱动器,基于驱动芯片drv8301的问题

Other Parts Discussed in Thread: DRV8301

在调试程序时当EN_GATA使能后可以测到GVDD DVDD AVDD的电压值11.4V 3.35V 6.6V即drv8301已经启动,里面的电荷泵及LDO都能工作,程序中的

while (motor1.drv8301.DRV_fault) ;  // hang on if drv init is faulty也能运行过去,说明8301是通过SPI配置好的

但是在运行程序的时候到PWM模块下的

PWM_1ch_UpDwnCnt_CNF_noDB(motor1.PwmARegs, INV_PWM_TICKS);
PWM_1ch_UpDwnCnt_CNF_noDB(motor1.PwmBRegs, INV_PWM_TICKS);
PWM_1ch_UpDwnCnt_CNF_noDB(motor1.PwmCRegs, INV_PWM_TICKS);

里面的ePWM->TBPRD = period / 2;即PWM的寄存器总是有时候写进去有时候写不进去,导致ADC不能正常的触发中断

1、我怀疑28379芯片有问题,于是运行contronsuite中的PWM例程,寄存器都能正常写入

2、我怀疑drv8301的问题,于是重新焊的新的芯片,同样这样的问题

所以我想请教下,我怀疑还是DRV8301模块的问题,因为程序之前在别人手里是可以用的。