[design log] Neat 2x170W I2S in, I2C controlled, integrated DSP amp (TAS3251)

About the click sound, which signal is there on input when it occurs ? is there some music or a silence ? Could you try to ground data, then mck, then lrck. Depending on the config the TAS could run in 3 or 4 wires mode : with or without MCK.
In order to locate the cause, you could try to remove C25 and C26. As a result, you will know if the issue is on the DIR-DSP-DAC side or on the Class D amp side. TAS3251 is a multi die chip.
What do you means by "I can also run the TAS3251 just by enabling the normal operation mode" ?
I encounter some weird and unpredictable behaviors trying to manage the chip with I2C running @400kHz. Which is your I2C speed ?, if 400 switch back to 100.

Hope this help...
  • On that particular video with the issue that I posted here, the input was sinewave at 90Hz
  • By removing the C25 and C26, what exactly I am supposed to observe after that?
  • By the "normal operation mode" I meant that after powerup, I can just write zero to register 0x02 at page 0, book 0, and it starts playing. I do not have to upload all the parameters for DSP etc (in this case I guess it works with default values after powerup)
  • I use 100kHz I2C. I will only try to use higher speeds after I rule out all other issues.

Thanks for the tips again
 
Member
Joined 2015
Paid Member
If issue only appears when input signal is present that means it is not spontaneous, this is kind of distortion.

Messing with I2S input signal was indented, in case issue was spontaneous, to evaluate if there was an issue around the PLL part of the chip.

Removing the two caps in signal path and feeding a differential analog signal to SPK_IN (see ref on your schematic) or listen to DAC_OUT with a test amp or even a headphone will allow you to determine if issue is related to the DIR-DSP-DAC section of the chip or the Class D amp section of the chip.

“Normal operation modes” is effectively the right test setup, but I do not remember if it was so simple: only R2 on P0B0. You certainly have noticed that the datasheet is full of error, everywhere, including in registers definition. They copy paste sections and diagrams from another chips… One very useful document is attached, it describes in p87 the start-up sequence, it’s a bit more than just writing in R2. You could try the parameters I use. Two files are attached, one for 3 wires I2S, and one for 4 wires I2S: with MCK.

Two cents question: there is no pullup resistor on your I2C lines, are they on the MCU side?

One other basic but important question: is your I2S source reliable? if it is 3 wires, is MCK grounded?

For now, I do not have much more suggestions except checking all signals with a scope, beginning with the click on speaker side (but with a diff probe, beware of ground) and of course checking all solder joints.

Chris
 

Attachments

  • TAS3251_Process_flow.pdf
    3.2 MB · Views: 197
  • 3_wires_sample.txt
    544 bytes · Views: 62
  • 4_wires_sample.txt
    473 bytes · Views: 52
You are right that the chip is not well documented. I did lot of my own work using an I2C analyser and observing the communication between PPC and EVM to actually understand some aspects of the protocol. You guessed correctly that I have the I2C pullups on the MCU side.

As the I2S source, I'm using the Up2Stream Pro module from Arylic. So far I have been considering it reliable, but I may also focus on it if nothing else helps.

Anyway, I appreciate all your help. You already gave me enought hints that will take days until I try everything out. I will post the results here once I'm done.

Thanks!
 
Hello everyone, my project is starting again. I finally received the TAS3251s this fall and I finally have the time to look at them again. All components are populated, power supply tests are ok. I have flashed the STM32 with CubeProg and the NeatAmp_V1.bin file. I installed ExtraPuTTY and there problem, I can't connect to the STLink. It appears under the name STM32 STLink and port 0006 in the device manager but ExtraPuTTY can't connect to it and I have nothing else that appears in the manager. I'm doing all this in Windows 10. If you have any ideas or tips it's gladly.
 
Member
Joined 2015
Paid Member
This kind of STLINK V2 adapter allows you to read, program and debug STM32, not to communicate with it thorough a physical serial port : there's no serial port on it.
In order to establish a communication between NeatAMP and the terminal running on your PC you have to connect your PC to NeatAMP with a serial link.
On NeatAMP teh serial port connector is J10 (see pic.).
If your PC has a serial port, don't use it !, you'll destroy the STM32 as levels are +/-12V.
You need an usb adapter with 0/3.3V levels such as the one in my previous post.


NeatAMP_serial.jpg
 
Hello, I just received the USB-serial cable. I can connect to the STM32 and interact with it but no way to upload the config file. I use the files transfer tab to do that. Whether I do preset to load before or not doesn't change anything. When I ask for the memory status I have 2 times 5 slots but all are not free but empty! And when I try to delete one of the presets it crashes everything. Where am I wrong?

Not being used to do programming other than on Arduino Uno, I'm having a hard time here. Thank you for your patience and your help.
 
Member
Joined 2015
Paid Member
Hi,

First you have been able to upload the software, it runs, and you are able to interact with via the serial link. That’s a good start !

As this is a fresh start, the memories are empty : 5 slots for the configs and 5 slots for the dsp presets.

About the crash, I don’t know, but it doesn’t really matter : deleting an empty slot is not a common use case… According to my memories and also to the code, it shouldn’t crash.

I currently have no way to check the behavior of the code to compare with what you describe: my NeatAMP is boxed and run a totally different software. But we should be able to do some tests based on my memories and also the source code.

To load a preset (config or filter set), you have to:

  • Use l command to choose which config or filter set you want to load
  • Use d command to set NeatAMP ready to accept incoming Ymodem transfer
  • In ExtraPuTTY terminal window, choose File transfer / Ymodem / Send then choose the file you want to transfer.
Then you have to choose which config and which filter set to use with p command, then you can play music and continue changing config and filter set.
 
Now I can download the files. But strange thing, when I download the test file you provided, the program does not recognize the names passed with @cfn and @fln nor the different blocks but if I create a new file and write in it exactly the same thing as in the other file then everything is well recognized!!!!!
Otherwise I don't have any sound in output, just a cloc at shutdown or after a reset but it can come from my I2S source. When I type 's' in the console there seems to be a problem with the I2S clocks. I continue my investigations hoping to get to the bottom of it soon.
 
Member
Joined 2015
Paid Member
Like many, I won't have much available time today.... :santa2:,

But, find here attached a new software in which I added a command : f in order to wipe EEPROM. You describe very strange behaviors which may be related to an EEPROM initialization issue, then to remove this hypothesis, just reinit EEPROM. Keep previous software, I haven't been able to test this new software as I do not have an easily accessible platform, so I cannot guarantee it is ok.
Also find two config files (same as in post #422 but with @cfn added and mute removed), load them, don't load any filter the try. Those are basics configuration for 3 and 4 wires which should work.
If still not working send output of s command. Before this you also could go through the suggestions made to Gordon01 beginning post#411. For now, my main questions are : is your I2S source reliable and is this a 3 or 4 wires (w/o or w MCK ?).

Chris
 

Attachments

  • 3_wires_sample.1.txt
    482 bytes · Views: 43
  • 4_wires_sample.1.txt
    409 bytes · Views: 45
  • NeatAmp_V1.zip
    69.5 KB · Views: 49
Hello, great news!

The new software works very well, no more bugs and no more EEPROM bugs. I have find a reliable I2S source and I saw that I have a soldering problem on one TSA3251 pin. After resolve it I have sound now and all works fine. Thanks a lot for your help AIM65. Ready for sound tuning now.

I have a last question, how do you manage volume? Your soft goes from 0 (vol min) to 100 (vol max) and the datasheet say that the TAS goes from 0x00 (+24dB), 0x30 (0dB), 0xFE (-103dB) to 0xFF (mute). Do you use the entire range of TSA volume or just the negative part (in dB)? And what are the volume steps used?

Seb.
 
Member
Joined 2015
Paid Member
Congrats !

The user volume is in the [0..99] range, which correspond to a TAS range between -103.5dB and a value designated by a constant in the software. Currently, this const is 48 which set a 0dB max gain. I've done this to limit the gain during the tests. I can release the horses : set the const to 0 which will set the gain to the max : +24dB.

New '+24dB' version .elf file is attached.

As you confirmed that this software is ok, I'll update it on GitHub.

FYI:
Volume is set at many place in the audio path :
  • Reg 0x3d and 0x3e in B0P0 in 0.5dB increments
  • Reg 0x07 and 0x08; in B0P1 for a +0.8dB boost on analog side
  • Reg 0x02 in B0P1 for a -6db attenuation in analog side)
  • into the DSP, Book 0x8c, Page 0x1e (B8cP1e) in Reg 0x44 and 0x48. In the DSP volume is coded on 4 bytes, fixed point Q9.23, the value for 0dB should be 0x00800000.
 

Attachments

  • NeatAmp_V1.zip
    69.5 KB · Views: 60
Last edited:
Hello mik4r,

AIM65 pinged me in my cave. Yes I can share the Gerbers, schema and BOM of the project. I would like to release all the package officially, but had no time to work on it. I could also provide the KiCAD sources if your project is to create Open Source variant also available for the community. Just needs a commitment to post the results here ;-)

@SEBASTIEN: I'm super happy that you succeeded to get the chips and setup the board! Congratulations!

And a special Thanks to AIM65 that helped and still help a lot for this project ;-)

JMF11
 
Hello! I'm more interested in the kicad files. There's stuff that I don't need and few things I'd like to do differently (fully open source ofc, if I have time to finish this project). I read this thread through and I was very intrigued by your success.
At the moment though I can't find any place that has TAS3251 in stock (Europe pref)?