CS8406 SPI problem

Status
Not open for further replies.
Hey Folks,

I'm having trouble in Interfacing a CS8406 from my XMOS Controller using the Software Interface in SPI Mode.

If i read the datasheed correct, there has to be a high->low transition after the device is let ouf of reset. Well I'm doing that...

my init code looks like this:
Code:
    set_port32A(11);    // OsziTrigger CS_DAC2
    clear_port32A(6);    // !Reset CS8416
    clear_port32A(1);    // !Reset CS8406
    set_port32A(12);    // ChipS CS8406
    delay_ms(1);
    set_port32A(1);        // Reset CS8406
    delay_ms(1);
    clear_port32A(12);    // !ChipS CS8406
    set_port32A(10);    // SCLK
    delay_ms(1);
    set_port32A(12);    // ChipS CS8406
    set_port32A(9);        // MOSI
After that i'm sending the following string to get the Rev ID and Version of the chip to test the spi interface:

Code:
            spivar=0x20;
            clear_port32A(12);  //CS low
            spi_byte_transmit(spivar);  //Transmit MSB First
            spivar = 0x7F;
            spi_byte_transmit(spivar);
            set_port32A(12);  //CS high

            delay_us(50);

            spivar=0x21;
            clear_port32A(12);
            spi_byte_transmit(spivar);
            spi_byte_transmit(0xFF); //dummy transmit to check a reacton on oszi
            set_port32A(12);
Well the problem now is that there is no reaction from the CS8406.
I checked the spi signals with my Agilent Scope and LA and it just looks like its described in the datasheet of the chip.

Is there any known issue about these Chips?
Or is my Code simply wrong?

Thanks for your help,
Greetings,
Manuel
 
On the CS8416 there's another problem it seems like it's stuck in hardware mode. The Pullup on the SDOUT line is present but seems to have no effect.

When i release the chip from reset on my SPI lines there signals can't get down to 0V about 1V is present if there should be a low, so i guess it's in hardware mode. And there is no answer either.

I could make some scope fotos of this but atm i'm running my usb streaming software on the xmos controller. Tomorrow there will be some time again for testing with the cs8406/16 chips.

They make a lot of trouble
 
If you have floating levels on some pins, it's maybe a sign that your chips were not reset properly.

To make sure you have a nice reset:
- first pull high the reset pin
- then pull it down and wait a while. 1 ms as in your code is fine.
- pull the reset pin up again to start the device

I can not see from your code what's the initial state of the reset pin (the code starts with 'clear_port' but the pin was maybe already low).
I finished not later than last week to test a prototype with a CS8416 - unfortunately in hardware mode - and it works really fine. However i had initially some resetting issue and noticed also some strange level on pin 14 which is NV/NERR in hardware mode.

Hope this helps
 
Playing with the reset pin didn't solve the problem 🙁

here are 2 scope pictures of my interfacing
yellow trace: Reset
green trace: CS
D0: CLK
D1: MOSI
D2: MISO
D4 Oszi Trigger signal

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


It's funny the usb streaming part works fine, thought i would have problems there and now it's those cs chips that are making trouble...
 
That's good news mstro!

Indeed the datasheet specifies that that pin should be tied to VL or GND if the chip is in SPI mode.
What was your idea behind the 47k resistor?

Anyway, you just need to solve your last issue with the cousin 8416, and then i hope you'll give us a quick chat about the xmos stuff
 
unfortunately i'm going on holiday for 3 days so there is no time for testing with the cs8416 till monday/tuesday but i can give you a short introduction about the xmos part of this project.

The whole project is an xmos based usb audio streaming application for the moment with s/pdif transmitter/receiver.
The streaming part is based on the xmos usb audio 2.0 reference design for 2 input and 2 output channels with up to 192kHz/24Bit.
I'm running it in difference to the ref design with a 400Mhz XS1 Device.
There are some customer wishes on the board, don't think i'm allowed to talk about them.
The xmos platform gives great possibilities. It takes some time to learn this special xc language for programming them in an efficient way. But now i'm loving these processors 🙂
 
unfortunately i'm going on holiday for 3 days so there is no time for testing with the cs8416 till monday/tuesday but i can give you a short introduction about the xmos part of this project.

The whole project is an xmos based usb audio streaming application for the moment with s/pdif transmitter/receiver.
The streaming part is based on the xmos usb audio 2.0 reference design for 2 input and 2 output channels with up to 192kHz/24Bit.
I'm running it in difference to the ref design with a 400Mhz XS1 Device.
There are some customer wishes on the board, don't think i'm allowed to talk about them.
The xmos platform gives great possibilities. It takes some time to learn this special xc language for programming them in an efficient way. But now i'm loving these processors 🙂

Mstro,

There are some weird things with channel status and the 8406. But I guess the big question is why use it at all? Why not just output SPDIF from the XMOS?

The other thing is that the 8406 needs to be reclocked on the output, for some reason it has some jitter issues with the supplies, clocking and buffering that need to be cleaned up.

Thanks
Gordon
 
The CS8406 is for evaluation purposes on that prototype pcb. There's a way to bypass it and use the XMOS for S/PDIF TX. The problem of XMOS S/PDIF is that it takes a whole Thread and when using the XUD Library you'll be only able to use 5 Threads with a 400MHz Type. So untill the 500MHz Controllers arrive i have to use the CS8406.

Well thats interesting going to do a jitter measurement when everything works fine 🙂
 
Status
Not open for further replies.