ΣSigmaStudio Ask AI Русский Log in

possibility to relay the spi-communication over the network

SigmaDSP & SigmaStudio nicholas-s Jul 1, 2018 00:00 9 replies Original on forum ↗
Subscribe
nicholas-s Question
Jul 1, 2018 00:00

would ne nice if you could provide a protocol over tcip/ip for the spi communication.

this way the DSP and the pc/laptop does not need to be connected over USB

i would prefer to drive the ADAU1467 via a raspberry pi (just an example)

Audio Signal Processors

adau1467

usb_spi

tcp-ip

SigmaDSP Audio Processors

usb_dongle

Show More

aventuri Reply
Jul 2, 2018 00:00

hi,

there's already something here: GitHub - analogdevicesinc/sigma-tcp: SigmaStudio Network Utility for Linux

but me i had to tweak a bit that source code to make it working for my setup:

GitHub - aventuri/sigma_tcp: a C gateway IP/I2C between Analog Device SigmaStudio and ADAU DSP

two notes:

my app is tested working for writing FW and tweak controls, but i'm still not able to read values FROM the DSP,

i tested against an ADAU1452 and do not know if the ADAU1467 is compatible!

hope it helps, bye

nicholas-s Reply
Jul 2, 2018 00:00

Thanks

I should be able to compile that as a user-program for raspberry pi, looks very familiar.

unclear tough why mister Lars, did not waste 1 single letter on commenting his code, and also unclear why it always needs to look more complicated than it is, obfuscated.

But why was not SPI used ?
A bit puzzling, beacuse on the USB device default is to use SPI , but on this software they use I2C ( a bit slower i assume)

Anyway, as i understand this should have no problem making a complete chain, so sigma studio has the same features as using the USB-SPI adapter ?

Thanks for you help, i have finished design of an ADAU1467 board, 8ch in 16 ch out, SPIDF in/out
RPI3 goes mezzanine.

I will probably reformat the pcb a bit before sending to production, will line-up the connectors better, and make sure the RPI also can line up against same back-panel.

f23762da83e574bc31fec8924ac025eb.png
f23762da83e574bc31fec8924ac025eb.png
f23762da83e574bc31fec8924ac025eb.png-1247x875.png
f23762da83e574bc31fec8924ac025eb.png-1247x875.png
aventuri Reply
Jul 3, 2018 00:00

Nicholas,

indeed my current design of the ADAU1452 is driven by a low speed I2C connection, so the tool was building on top of it.

i suppose that "hijack" the Sigma_tcp tool backend toward a SPI connection would not be such a big deal, anyway.

SPI user level being accessible with the "legacy" spidev module on Linux (still not that great performance-wise, but at least is electrically more robust!)

as i've found, the I2C is a pretty "finicky" bus on noisy environment if you want to do continuous communication (like reading RMS meters and so on..), so i'd steer toward a SPI connection on a new design, too!

bye

PS your board is great and you did quite a packed design! the first thing i notice anyway is that you are gonna be "constrained" for the case as you have connectors at least on three of the four sides.. i know it's not easy to put all the I/O on less, anyway.

nicholas-s Reply
Jul 3, 2018 00:00

I was already planning on changing the layout, for better "box-ability"

from the beginning this was only meant as a quick and dirty design replacing the eval-board

but the ambitions grew..., as always

nicholas-s Reply
Jul 15, 2018 00:00

recommend to clear the struct content in linux

has caused me problem in other projects no to do so.

struct i2c_msg msg[2] = {0};

int i2c_fd = -1; // I2C device handle.

will upload it completel once i got it working,

I compile as c++ for raspbery pi, so there will be some adjustments

struct adauReqHeader_s {
uint8_t controlBit;
uint8_t totalLen[4];
uint8_t chipAddr;
uint8_t dataLen[4];
uint8_t paramAddr[2];
//uint8_t reserved[2];
};

you commented out the 2 last reserved bytes.

this does not match the wiki.

TCP/IP Channels (ADAU144x / ADAU145x) [Analog Devices Wiki]

is the wiki proven wrong ?, or do you just choose to ignore the last bytes, if so probably increase the risk of getting out of sync.
I am not at home and can try this out myself just now.

analyzed the code further, a miracle it works at all.

needs a major re-write

i will be back.

nicholas-s Reply
Jul 15, 2018 00:00

Hi

I found the wiki to describe the tcp format

TCP/IP Channels (ADAU144x / ADAU145x) [Analog Devices Wiki]

so i guess that with the help of the debugger even the reads should be able to fix

or am i wrong ?

i did see that the I2C reads always starts with an address write so the repeated start requierment should be ok.

but then again that "limitation" only applies to i2C and not SPI

nicholas-s Reply
Jul 19, 2018 00:00

just as i started to debug this gw-code I realize i cannot connect a adau1467 in sigma studio over tcpip

there is no tcpip driver for adau1467 in the studio itself.

connecting an adau1452 i could do and fix the tcpip/i2c/spi gateway, but i wont be able to use it anyway ??

ouwww, i am beging to be a little bit depressed.

i get the feeling this dsp / sigma studio product line is not given much love from analog.

and my 10pcb just arrived from china.

hmmmmm

aventuri Reply
Jul 25, 2018 00:00

hi,

sorry to be late to reply! my browser didn't log me in automagically! :-|

surely the code quality could be improved, but it was "good enough" for my needs! :-)

anyay, i hope in a few days to put my hand on an ADAU1452 board with SPI interface exposed. then i'll try to test/fix the IP to SPI gateway! indeed the ADAU1467 is missing the TCP module on Sigmastudoi.

anyway i just "stumbled" on this thread and it looks like we are going to see a new "USBi MK2" interface so new Sigma Studio to support it and eventually the TCP/IP link for the 146x part too!

i'll let you know if i move forward, August is the right month for accomplish something fancy, here at work in Italy! :-)

DaveThib Reply
Jul 31, 2018 00:00

Thanks for your comments and requests. I have passed it on to the software team so it gets onto their lists.

Meanwhile, your questions about the 1452 compatibility, it is fully compatible in that any 1452 program will run on the 146x processors. However, if you are using the extra features available with the 146x products then that will be a problem. The extra serial port pins and extra memory will not be available when using the 1452 DLL.

Now if you use the proper 1466 DLL and try to make the connection to the 1452 TCP/IP communication channel you will find you cannot connect it. SigmaStudio will not allow the connection to a different part. So there is not a good work around you can use at the moment. I will push for this to be added but not sure when it might be available.

So for the moment the only work-around will be to switch the DLL over to the 1452 DLL but I suspect this is not going to work for your application.

Dave T