adau with uC . improve size of data. memory optimization
in generated file for uC a lot of zero in memory. it takes a lot of place.
i mean 3 positions:
ADI_REG_TYPE DM1_DATA_Data_IC_1[DM1_DATA_SIZE_IC_1]
ADI_REG_TYPE Program_Data_IC_1[PROGRAM_SIZE_IC_1]
ADI_REG_TYPE Param_Data_IC_1[PARAM_SIZE_IC_1] =
so in this a lot of questions^
1. do we need to write zeros for this parts(need answer for each point) after reboot
2. can we use params for coeffs from cardsp_V1_IC_1_PARAM.h and delete param data from ...IC_1.h
Hello,
1. For removing the zero initializations, I just added a Python script to this post which should help you:
https://ez.analog.com/dsp/sigmadsp/f/q-a/165509/adau1701---exported-system-files-are-way-too-big
There are some cases where it is important to initialize the zeros. You can do this yourself in a loop to save microcontroller memory compared to the original export files.
2. The content in the _PARAM.h file is not guaranteed to contain the entire parameter memory. As you can see in the post I linked below, there are some values which we know are not included. So you should definitely retain the default parameter data in the _IC_1.h file and use it to initialize the DSP. After the DSP is booted you can switch over to the _IC_1_PARAM.h file to change values in the algorithms.
Also, if you have not seen it yet, we now have a Wiki page with example Arduino code to interface with SigmaDSPs.
https://wiki.analog.com/resources/tools-software/sigmastudio/tutorials/microcontroller
Joshua
about scripts its to interesting. i try to do it.
I know that params must loaded so all params in params file i load separately from main boot.coefs loaded in second boot part. so i need only main part.
P.S. Thanks a lot. Maybe you see on forum parts to simulate sigma mode for workin with uC? i mean that i alreadey heve usb - to adau gate(my program with my interface), but i need to somtimes switch to sigma studio program/ so i see 2 ways. to realize same mode as usbi or use additional mode for usb(tcpip over usb) and switch mode internaly. maybe you see code for usb-i (in c++) to implement it.
Hello,
For now, the only way SigmaStudio can communicate with external programmers is using TCP. The USBi code is specific to hardware, so it would not be straightforward to implement a USBi emulator in your microcontroller.
However - TCP is a flexible interface. It would be easy to create a desktop program which translates the TCP packets into serial port data for your microcontroller. Just something to think about.
Joshua
Please log in to reply.