STA013 problem

Jun 25, 2005 12 Replies

Hi,



I have problem to let the STA013 working.



Let me say some background information: It seems that the I2C interface is OK. I can recognize the chip by retrieving the chip ID. I can upload the configuration file without problem. The crystal frequency is 14.3818MHz. I know that some register values are different for different frequencies.



I download the data to the SPI interface. I know that it is required to swap bit order. But The chip cannot output digital signal to the AD converter CS4330. The SDO always sticks to 0V. :{



Could anyone give me some hints? Any hint is valuable. Thanks!


Thanks for your reply.

For the sta013, the I2C bus is ued to configure the chip and the SPI interface (Pins 5,6,7) is used to stream the mp3 data into it. I used normal IO port to push data so that I need to swap bits before serialize into the STA013.

The I2C interface is indeed OK as it returns correct chip ID, and so I think it is OK. I think I should say it more firmly.:)

I suspect that maybe not many ppl have expereince of the sta013. I had to google it to find out what is was.

I'm familiar with I2C, serial audio data and although haven't yet used SPI am familiar with how it works ( since I'm looking at a device with an SPI i/f for a potential project ).

I have however no idea from your post exactly what problem you're experiencing.

What data is it your shifting from I2C to SPI ? And why ? Note that " It seems that the I2C interface is OK" suggests you're not totally confident.

If you've got some data_req stuck low - clearly that device isn't seeing what it's expecting ( suggesting transmission error ).

A block diagram ( even verbal description ) would help.

Graham

Uh ?

This part doesn't have an SPI interface. It would be odd if it did really since there'd then be little point in it having an I2C interface.

I think you're confusing SPI with something else.

What's all this about swapping bit order too ? The audio data ? A chipset solution would do that for you if competently designed.

I suspect you've misunderstood something big time.

Graham

You mean the attn and ack and stuff ?

I've never used a scope to code I2C ! It's seems so simple I don't see where you can go wrong.

You *can* drive it too fast maybe ? My code was actually developed from some that a guy wrote for us that 'kinda worked'. I went through it with a fine toothcomb and weeded out the 'indeterminate' or unapproved pin conditions and it's been rock solid and seen service in several products since.

Well, to be honest once again I wouldn't expect to need a scope. Didn't need one for a proprietary serial DSP i/f a while back either. It just worked ! Wasn't entirely unlike I2C but 32 bits data wide ( or long I should say ! ).

Were you trying to code your I2C in assembler or something ? I used pl/m51.

Philips used to offer their I2C library in asm51 for free IIRC. In theory it's possible I may have it on disk.

Graham

Yes.

Unless I don't get it - that's not what I call an SPI interface.

That'll also explain why the sta013 isn't outputting any audio data.

I don't understand what you're saying there. What exactly is the source of the mp3 compressed data ?

What kind of 'normal I/O' ? I'd call 8 bit parallel about as normal as it gets but even Intel and Motorola couldn't agree on read and write strobes.. All the serial formats ( which it is ) are a bit quirky.

Ok.

Look at the transfer protocol for that SDI ( not SPI ) input ! I think that's your problem.

Graham

Oh - quick follow up. I searched both the data and app note for a mention of SPI. Zero hits.

STM calls the input " SERIAL BITSTREAM INPUT INTERFACE " which makes a hell of a lot more sense to me.

See Figure 6. Serial Input Interface Clocks on the data sheet. Doesn't look like SPI to me - could be wrong I guess. Nahhh I'm sure SPI doesn't need that many pins for unidirectional data.

data_req is *telling you* it's not receiving the audio data. That's why it's stuck. I'm convinced you're trying to talk to the chip using the wrong protocol.

Graham

ugh I've never managed to get my 8051 I2C code to work, mainly because I can't figure out handshaking, despite falling asleep over the I2C spec many many times.Only having a dual beam scope is prolly a disadvantage as well. I just use SPI now, easy peezy, I can scope it and see whats happening.

/moan

martin

Acutally someone used this chip called the data source port SPI and so I also mention it as a SPI.

I have configured the polarity of the data_req to be active high.

I will follow this direction to debug. Thank for your help.

yep

I'm not really a programmer, just drifted into it when the my mate "The Programmer" got a high paid full time job, and twins to feed

Never used a DSP, still a 5534 guy at heart really

Plain old C with the 8051 Raisonance complier and a spaghetti-ware detector

No prob's, I'm working with TI's PGA2310, (SPI) and HC595 s/regs, and I haven't got any I2C ics anyway.

Maybe I'll dig out the offending code one day and have another go

martin

Yet a closer look suggests that the serial data in is indeed like SPI but uses some wacky pin names !

Also it has to handshake with data_req. Note that the active state of data_req is selectable in one of the configuration registers.

I still reckon an absence of serial data out to your DAC means that the sta013 input isn't seeing any data in.

Graham

I used my oscilloscope to see the SPI data into the STA013 SPI interface and see the data and clock signals are correct as expected. The data is serially streaming in with MSB firstly. No data is out to the DA converter. Quite frustrating!

The data is retrieved from network. I want to ask normally how many data I need to pumped into the STA013 before it can output the first byte to the DAC?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required