PCM1863: DSP Registers are not addressable

Part Number: PCM1863


Hi Experts,

Can you help troubleshoot the issue below?

for my project it is necessary to be able to switch between the different input ports. When I try to change the dsp register configuration by following the programming sequence described in the datasheet, the W_REQ Bit does not reset. The flag is only resetable by powering off the device. 

I try to configure the DSP registers at the end of the init phase. Are there some sw or hw dependencies which have to be configured first before writing to the dsp registers?

Regards,

Marvin

  • Hi Marvin,

    Can you share your programming sequence? Once you do the dummy writes to register 0, then specify your 24 bit value, then write to the W_REQ bit, it should reset. You may need to read the W_REQ bit another time or two until it is done writing, it should be able to write once per audio sample. It also only works if there are clocks applied to the DSP.

    Best,
    Mir

  • Hi Mir,

    the programming seqeunce is below

    AudioADC_Status pcm186x_writeDspCoefficient(uint8_t deviceAddress, AudioAdc_PCM186x_DspRegisterMap reg, uint32_t newValue)
            if(pcm186x_checkDspReady(deviceAddress) == true)
            {
                // set address
                data[0] = (uint8_t) reg & 0x7F;
                state = pcm186x_sendDataRaw(deviceAddress, (uint8_t) MEM_ADDR, data, 1);

                // set new data
                data[0] = (uint8_t) ((newValue & 0x00FF0000) >> 16);
                data[1] = (uint8_t) ((newValue & 0x0000FF00) >> 8);
                data[2] = (uint8_t) (newValue & 0x000000FF);
                state |= pcm186x_sendDataRaw(deviceAddress, (uint8_t) MEM_WDATA0, data, 3);

                // execute write command
                data[0] = AUDIO_ADC_PCM186X_COM_STAT_W_REQ_MSK;
                state |= pcm186x_sendDataRaw(deviceAddress, (uint8_t) COM_STAT, data, 1);
               }

    with 

    bool pcm186x_checkDspReady(uint8_t deviceAddress)
    {    
        uint8_t comStat = 0xFF;
        while((comStat != 0)
        {
            pcm186x_changePage(deviceAddress, PAGE1);     // send 0x00 0x01
            pcm186x_changePage(deviceAddress, PAGE1);     // send 0x00 0x01
            pcm186x_changePage(deviceAddress, PAGE1);     // send 0x00 0x01
            state = pcm186x_readDataRaw(deviceAddress, (uint8_t) COM_STAT, &comStat, 1);    // read 0x01
        }

        return true;
    }

    I already tested a lot with changings within the sequence, adding dummy bytes, etc. 

    Best regards

    Hendrik

  • I do not do the write command 0x02 0x2D. Is this command independent to the data which should be written? What is behind this command?

  • Hi Hendrik,

    That register 0x02 is to set the memory address for the virtual DSP coefficient registers. So the 0x2d "address" is the command that tells the virtual DSP that you are about to write the energysense resume threshold. This table from the datasheet shows all the possible addresses, which you would write to register 0x02, to switch the DSP coefficient mode for the next coefficients you give in registers 0x04-0x07.

    I am not sure with your code what you are trying to achieve but let me know if you need more help and if you can give a little more info about what specifically with the DSP you are programming. 

    Best,
    Mir