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.

关于DRV8412EVM演示版中IQ格式的问题

Other Parts Discussed in Thread: DRV8412

DRV8412控制双直流有刷电机的例程中,关于AD采样的IQ格式转换问题,有一点不明白的地方,请教一下各位高手:

下述一段代码:

    IFdbk1b=_IQ15toIQ((AdcResult.ADCRESULT4<<3)-_IQ15(0.5))<<1;  

其中    (AdcResult.ADCRESULT4<<3)  这段,不是很明白。

其意义应该是IQ12转IQ15,但是为什么AdcResult.ADCRESULT4对应的是IQ12格式的呢?

它是结果寄存器,对应的数据范围为[0,4095], 跟IQ12没有必然的关系啊!