I have a design running on a SHARC platform. I have exported several modules from the design and created a desktop application that controls the design (via the serial tuning protocol).
When I make changes to the module parameters, I would like to be able to save these new values to the target. How can I do that?
1:15pm
Yair,
Do you mean you would like the parameter changes made from you desktop application to be reflected in the layout running on the SHARC, or you would like to save the layout with those new parameters to the SHARC as an AWB?
The former should already be happening through the tuning interface. The latter would involved saving an AWB to the sharc's flash memory.
1:23pm
I already can control design parameters on the SHARC at runtime using the Desktop application (via the tuning protocol). However, once I made the required settings via the desktop app, I want to save these settings into the SHARC flash, so it will be persistent (e.g. they will apply the next time I power up my device).
I just need to know/understand the steps to achieve that.
Thanks,
Yair
4:08pm
Currently there is not a specific AWE feature for dynamically saving layout variables to the target. There are some static methods, in which multiple different presets can be saved to the target and loaded when commanded. These are mentioned here https://documentation.dspconcepts.com/awe-designer/latest-version/preset....
For your request of dynamic saving of variables, this would need to be done in your BSP application code, where the commands from your gui (module, parameter, value to be changed, etc) are saved to something like a C structure, then at bootup the BSP application would iterate through all of these saved changes and implement them via the control APIs (ie. awe_ctrlSetValue() commands).
4:13pm
I remember several years ago DSPC implemented something like this for me (on STM32F4 platform). It uses the Record command, issue all parameters update, stop the recording and save.
Is this still the correct approach? If so, can you point me to the right commands in the tinning protocol (so I can add them to my C"" code controlling the SHARC.
Thanks,
Yair
5:20pm
Was it the awe_diary command? Like awe_diary('on', 'preset.aws') that tracks all of the aws commands sent from designer to AWE Server. This is used from matlab, but could be configured to use with your GUI.
7:14pm
The sequence was done completely from C++ code. It started by sending a Start Capture (or Start Recording command) to record all running commands sent to the device (via the C++ application)
All I have to do was to replay all the set commands to the proper module variables with the values I want to be saved, and once done, I simply stopped the recording and issue a command to save the recorded file (as .AWB) to the local flash with the following attributes:
*pFileAttrib = 0; // Zero all attribute bits
nAttrib.Startup = 1;
nAttrib.Script = 1;
nAttrib.Compiled = 1;
After that, I simply saved the file.
When the system restarted after that, the actual design AWB was loaded, and the new parameter file too.
Does this sound familiar? If so, can you point me to the protocol commands to use (remember, that code was written by DSPC consultant for me more than 10 years ago...)
Thanks,
Yair
10:05am
Any update/answers to these questions?
Yair
5:33pm
Hey Yair,
I do not think we offer this exact functionality anymore, and therefore this may involve some custom C++ application work/support. If you would like to look into getting deeper support on this please let me know and I can start an email thread.
5:58pm
If this functionality is somehow available with the current Tuning protocol, than yes, it will help if someone can help me by pointing me to the correct protocol commands and required sequence.
If this require custom work on the actual target BSP than it might not work for me, as I need a target independent solution.
Thanks,
Yair
4:39pm
There are no tuning commands for the record and stop record functionalities you described. This could be custom implemented in your GUI where you log parameter change commands (like setValue) into a buffer and then construct the binary command packets that the BSP interprets from those and store them as an AWB. You would then need to issue write commands like PFID_OpenFile, PFID_WriteFile ...., PFID_CloseFile to write to the SHARC's flash file system.
Then, in the BSP, you would need to implement two awb calls from flash (if not already implemented) to instantiate your signal flow layout and then the saved preset awb on bootup.
UINT32 pos = 0;
awe_loadAWBfromFlash(&g_AWEInstance, "DEFAULT.AWB", &pos); // base layout
awe_loadAWBfromFlash(&g_AWEInstance, "PRESET.AWB", &pos); // tuning preset overlay
5:25pm
Thanks,
Yair