工具与软件:
我不使用音频芯片、DSP 工程师在度假、但我被分配了一个关键错误。 我已将该错误定位到以下代码片段中:
codecSpiWrite(1, 12, 0x00, cs); // Nothing -> HPL codecSpiWrite(1, 13, 0x00, cs); // Nothing -> HPR codecSpiWrite(1, 14, 0x00, cs); // Nothing -> LOL codecSpiWrite(1, 15, 0x00, cs); // Nothing -> LOR timeOut = 10000; while (((codecSpiRead(0, 37, cs) & 0x66) != 0) && (timeOut-- != 0));
"页0/寄存器37:DAC 标志寄存器1"的位1永远不会变为零、因此 while 循环需要很长时间(>200ms)并最终超时。 这意味着 HPR 在预期断电时似乎已上电。 有人能指出解决这个问题的正确方向吗?