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.

USB Audio DAC PCM2707 SPI issue to program device descriptor

Hi,

I use a PCM2707 in my design, with the SPI i'm able to send command like Play/Pause Next Previous so I think the hardware is OK.

 

I want to use the SPI to program the device descriptor to configure the Product and Vendor strings

I want to precise this is not a trouble of D+ pull up I desactivate it during the device descriptor programming.

I have noted the data should be sent from LSB to MSB and also they should be sent continuously after the ADDR bit has been set to 1.

I think this maybe coming of timing issue.

If we look to the page 24 of the datasheet I should be in the case continuous write operation to send the 456 bits of ROM

My question should I have a delay between each 16 Bits?

 

Do you see others explanations? or any advice ?

 

Thanks in advance

 

Best regards,

 

Matthieu

  • Hi Matt,

    did you have any success with the descriptor programming?

    Greetings

  • Hi,

    Hopefully I succeded it was almost 7 month ago.

     

    Cheers,

    Matt

  • Hi Matt,

    TI's documentation around this subject is very poor and possible missleading (?) and I have tried all possible alternatives that I can come up with when writing this data. Where is the error?


    How did you mange to get the right data into PCM2707 over SPI?

    best regards,

    Esa

  • Ok.


    I just realized that the biggest problem may be how to produce the needed continuous flow of 16bit X N Frames with an SPI hardware that has byte oriented data!!!

    Esa

  • From the datasheet what I understand is that the following is needed for programming the descriptor over SPI:

    • PSEL = High
    • HOST Pin = High
    • D+ pull up not activated
    • LSB first (within the 16 bit word) with specified byte order

    To start the Descriptor write, a 16 bit word setup as followed must be sent to the part:

    Where for the first word will be, ST = 0 and ADDR = 1, and D0-D7 will be an HID status. Then the next 57 words will be sent continuously, following the timing diagram on page 24 of the datasheet with ST=1 and ADDR = 0 and D0-D7 being the descriptor data. 

    Is this how it is currently being implemented?

    Justin

     

  • Hi Justin,

    No, this is not how we have tried to do the descriptor write since present PCM2707 documentation tells that after reseting the ROM address counter by writing ADDR=1,  "456 bits of ROM data must be continuously followed after this bit has been asserted. The data bits must be sent from LSB (D0) to MSB (D7)".

    456 bits = 57 bytes and not words.

    My interpretation about you email is follows:

    1. Reset ROM address counter by by writing hex data "0x02 XY" i.e. ADDR=1 and XY is actually a dummy HID write (USB DAC has not yet even been enumerated by the PC since D+ pull-up has not been activated).

                            Question: Is this really necessary? We have just booted up. Reset the counter just to be sure?

    2. Write the 57 bytes of data in 57 words as "0x04 DB" where ST=1 and ADDR=0 and DBs are the data bytes bits in D0-D7 order.

    Is this what you are saying?


    Esa

    PS. Real HID writes are carried out with D+ pull-up activated? If you deactivate the pull-up, your DAC will be disconneted for a while, doesn't it? And this is not a good idea in my opinion.

  • Hi Esa,

    Yes this was not presented in the clearest way in the data sheet, but looking and the timing diagram it shows that a continuous write is 16 bits x N frames, which would be 57 words, carrying 8 bits of ROM data each, with ST =1 and ADDR = 0 to get the 456 ROM bits. Your interpretation is the scenario I believe will work.

    As regards to the D+ pullup I am not sure about the operation of that with the DAC and will have to look more into it.

    Justin

  • Hi Justin,

    the descriptor can be written using conventional 8-bit SPI data in 114 bytes with every odd byte as 0x08 and every even byte as the 8-bit descriptor data in D0 ... D7 order, as you described.

    It seems that reseting the counter is actually not needed.


    Thank you for your help.

    Esa