So how about all this programming the host microcontroller stuff, anyhow?
Alright, i'm not Bob Pease....
So I'm new to DSP and I've got the AD1940 EVK and written (drawn) a lovely program in Sigma Studio.
I want to get that code and stuff it into a microcontroller to boot the DSP in the target application.
What do I do? Am I right in thinking i'll need to include xxx_IC_1.h into my microcontroller source, and then write my own functions for all the #defines in SigmaStudioFW.h? Or is there more to it - more files to include maybe? Are there any functions or libraries i'm missing?
What about safeload writes? I can see SIGMA_WRITE_REGISTER_BLOCK() and SIGMA_WRITE_REGISTER() inside SigmaStudioFW.h. Do i need to write functions to write via the safeload registers for run-time parameter updates? Also, what is SIGMA_SET_REGSITER_FIELD ?
Any example C files greatly appreciated - target application controlled by PIC16/18 by the way.
Thanks in advance, sorry about all the questions - it's a lot to get one's head around for a newbie.
Lewis.
ad1940
Audio Signal Processors
boot
programming
microcontroller
microprocessor
SigmaDSP Audio Processors
interface
library
Show More
Hi Lewis,
The system file output functions are quite new to SigmaStudio and it will take a bit of time for us to produce comprehensive documentation to help out people in your situation. This is a big priority for us at the moment. A microcontroller integration tutorial will probably be available first as an application note, and then in other formats (video? reference designs?) as we are able to devote more time to the cause.
You are correct that you'll need to use those system output files. There are a few other files that could be useful. I'm going to start a new forum topic today that explains how to export the write data buffer and length information for the uC to program the SigmaDSP upon boot. Look for that on this forum in a few hours.
Right now, uC integration in SigmaStudio isn't very automated at all, so unfortunately you'll be writing most of the code on your own. However, we hope to greatly expand our support in this area in the near future.
Hi Lewis,
Actually, there is already a thread that contains a lot of information about generating the appropriate files for system initalization. Please check here:
Hi Brett, many thanks for that information, i'll check out that forum now. Glad to know you guys are working on solutions.
I intend to write libraries to interface to the DSP in pure C, and not app specific, making the code as portable as possible. If you and other readers find it useful, i'll send it to you.
Kind Regards,
Lewis.
Thanks Lewis, and please keep us updated on your progress. We provide the basic building blocks with those output files, but have yet to create a more comprehensive code wrapper for getting an entire target system up and running.
I currently am working with a board that has an ADAU1442 and ARM Cortex Microcontroller connected via I2C bus. I'm hoping to develop a working design on this board and then make the code available to customers via an application note or complete downloadable reference design. The timeframe, however, is still up in the air.
Hi Brett, will do. I'm working on AD1940 with PIC16 at the moment, hoping to make compatible ARM and 3rd Gen Sigma DSPs too (for product longevity and all that....)
Can't find that forum topic you mentioned in your first reply, probably being blind.
Please let me know how things work out with the Cortex...
Lewis.
I'm in a similar boat. Trying to use a small PIC uC to load programs at boot. First loading the program off a microSD card, then into the ADAU1761 via I2C. That way we can send users new program files via email, and they can load onto microSD using their Mac/PC.
I need it too...Now I'm working for get my PIC24 set ON/OFF some mute switches, but I need also to convert the data numbers for Volume Sliders, frequency filters and sine generators...
The basic function headers in the "SigmaStudioFW.h" file are usefull for start with your own implementation... but them are very dependent on the Compiler Type...so I don't think that a more specific definition could be done
I think, for a more portable solution, the writing and reading functions (for both I2C and SPI...) shold be wrote like (for example in C language) like
//PUT HERE YOUR FUNCTION THAT WROTE the ( devAddress, address, dataLength, data ), but it isn't more usefull...
The things that Analog Devices could implement are the conversion function for the functional blocks.
For example if I have to turn on a mute switch, I have to write
0x00, 0x80, 0x00, 0x00 - Or 1 in 5.28 format on my functional block Address
and for turn off it
0x00, 0x00, 0x00, 0x00
This is pretty simple for an ON/OFF Switch, but if I need to control a sine wave generator, I have to convert the ON/OFF switch, and the Frequency Value... and the code grows...
So, if we could access to a complete set of "Conversion Function" like
DATATYPE SineGeneratorFrequency(int frequencyOnScheme)
{
DATATYPE DataConverted;
//MACROS FOR THE CONVERSION
return DataConverted;
}
the SigmaDSP based System development could be faster, and more portable.
I know that it is an HUGE WORK...but I think it could be a lot usable.
As the SigmaStudio concept is to let Graphically Programming of DSPs, I think that what we see on the SigmaStudio Schemes should be EASY to translate in a microcontroller (or also a PC with a SPI-or-I2C interface...)
Just came across this old string and was wondering if anyone has submitted a C function or macro to convert an integer into the 4-byte hex value (representing 5.23 format) needed for programming / writing to a parameter.
Thanks,
Ray
Mea culpa, I found the "To523" function in the SigmaStudio help file.
Ray
Has anyone written a From523() function yet? I imagine it's declaration would look something like this:
float From523(byte* param_hex);
I Wrote this but never used it in the project
It should work.
The passing Pointer is to the 5,32 array
float From523(unsigned char* param_hex)
{
float ans;
unsigned long param227;
param227 = param_hex[0] ;
param227 = param227<<8;
param227 = param227 | param_hex[1] ;
param227 = param227<<8;
param227 = param227 | param_hex[2] ;
param227 = param227<<8;
param227 = param227 | param_hex[3] ;
param227 = param227 ^ 134217728; // invert the sign
param227 = param227 - 134217728;
ans = (float)param227/8388608;
return ans;
}
So, what is the status of the documentation that was discussed in the chain with regards booting the SigmaDSP from a host? Is this posted somewhere?
Hi everyone,
Sorry, this is long overdue. I currently have a brief tutorial in the form of a PDF-converted PowerPoint presentation. I also have the full design and code files for an ADAU1761 in a system with an ARM Cortex M3 microcontroller. You should be able to see how the framework macros are created and how we use the sequencer to define operating modes and create download sequences for the micro. It's not fully documented, but I think it's good enough that you should be able to see what's going on without too much difficulty.
The PDF and project files are attached. Please take a look.
This question has been closed by the EZ team and is assumed answered.
Please log in to reply.