Hello
Need some help with flash manager and default bootup of Audioweaver binaries.
OK. I can upload from Audioweaver to the hardware and run the script no problems.
I can convert the script to binary and upload that into flash memory with the boot option enabled. Also I can save the file on the flash to a file on the HD and do a file compare to make sure there is no file corruption. So far so good ;)
The problem I am having is when I reboot the hardware the AW binary is not being run automatically.
The other issue I noticed is that if I click on the file in the flash manager and click on "Execute File" I get the following.
Now if I go Audio -> "Audio Start" and then click on "Execute File" it's working ok so the issues are perhaps the Audio is not being started properly when the system is being reboot.
I must confess that I handle the Sport interrupt different on my system to your demo. On my system the SPORT interrupt is always enabled and I just gate the Audioweaver processing using a flag rather than disabling it when the Audio stops. Perhaps this is causing some issues if you are reading some of the sports registers to see if interrupts have been enabled or not.
Regards
David
10:53pm
Hello
I did a dump of the Flash Memory as Audioweaver reads it in but it appears to only read in a little bit and then gives up for some reason which would explain why it is not loading up the AWB file and running it. In fact it only reads in the first word of the AWB file !!
nAddress, pBuffer, nDWordsToRead wordsRead->
0x00070000 0x000BDFE0 5 -> 0x00000010 0x00070040 0x00071000 0x00070000 0x41570001
0x00071000 0x000BDFE0 16 -> 0xE5FF0000 0x00000336 0x65766F58 0x69772072 0x44206874 0x6D696365 0x6277612E 0x00000000 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF
0x00071D40 0x000BDFE0 16 -> 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF
0x00070040 0x000BDFF0 1 -> 0x00000000
0x00070044 0x000BDFF0 1 -> 0x00000000
0x00070048 0x000BDFF0 1 -> 0x00000000
0x0007004C 0x000BDFF0 1 -> 0x000007FF
0x00071000 0x00674F0C 16 -> 0xE5FF0000 0x00000336 0x65766F58 0x69772072 0x44206874 0x6D696365 0x6277612E 0x00000000 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF
0x00071000 0x00674F0C 16 -> 0xE5FF0000 0x00000336 0x65766F58 0x69772072 0x44206874 0x6D696365 0x6277612E 0x00000000 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF
0x00071040 0x000BDFD3 1 -> 0x0002001C
11:11pm
Just noticed one thing that the binary file does not contain the length of the command array at the end of it ?
And this is also reflected in the flash memory dump.
/* ----------------------------------------------------------------------
** Static Audio Weaver command packets
** Source file = D:\WORK\AUDIO DESIGNS\CROSSOVER\DSP CROSSOVER\Audio Weaver\8-Ch Stereo Pass Through.awb
** Created on 20-Jul-2017 18:36:00
** ------------------------------------------------------------------- */
#define AWB_SOURCE_FILE "8-Ch Stereo Pass Through" // Name of the .awb file from which this file is generated
unsigned int InitCommands[] = {
0x0002001c, /* PFID_StopAudio CoreID=0 */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010002, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010008, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010002, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010001, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010001, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00060006, /* PFID_ClassWire_Constructor CoreID=0 */
0x483b8000, /* 0x483b8000 [Pin pointer] */
0x40010008, /* TBD */
0x00000040, /* TBD */
0x00000000, /* TBD */
0x00040007, /* PFID_BindIOToWire CoreID=0 */
0x00000001, /* 0x00000001 [Wire pointer] */
0x00000001, /* 0x00000001 [I/O pin pointer] */
0x00040007, /* PFID_BindIOToWire CoreID=0 */
0x00000002, /* 0x00000002 [Wire pointer] */
0x00000002, /* 0x00000002 [I/O pin pointer] */
0x0009000f, /* PFID_ClassModule_Constructor CoreID=0 */
0xbeef0866, /* 102 [classID = TypeConversion] */
0x00000101, /* 0x00000101 [nIO. numIn=1. numOut=1. numScratch=0] */
0x00000002, /* 2 [argCount] */
0x00000001, /* 0x00000001 [wire 0] */
0x00000003, /* 0x00000003 [wire 1] */
0x00000001, /* 0x00000001 [arg 0] : inputType = 1 */
0x00000000, /* 0x00000000 [arg 1] : outputType = 0 */
0x0008000f, /* PFID_ClassModule_Constructor CoreID=0 */
0xbeef0861, /* 97 [classID = Deinterleave] */
0x00000201, /* 0x00000201 [nIO. numIn=1. numOut=2. numScratch=0] */
0x00000000, /* 0 [argCount] */
0x00000003, /* 0x00000003 [wire 0] */
0x00000004, /* 0x00000004 [wire 1] */
0x00000005, /* 0x00000005 [wire 2] */
0x000e000f, /* PFID_ClassModule_Constructor CoreID=0 */
0xbeef0862, /* 98 [classID = Interleave] */
0x00000108, /* 0x00000108 [nIO. numIn=8. numOut=1. numScratch=0] */
0x00000000, /* 0 [argCount] */
0x00000004, /* 0x00000004 [wire 0] */
0x00000005, /* 0x00000005 [wire 1] */
0x00000004, /* 0x00000004 [wire 2] */
0x00000005, /* 0x00000005 [wire 3] */
0x00000004, /* 0x00000004 [wire 4] */
0x00000005, /* 0x00000005 [wire 5] */
0x00000004, /* 0x00000004 [wire 6] */
0x00000005, /* 0x00000005 [wire 7] */
0x00000006, /* 0x00000006 [wire 8] */
0x0009000f, /* PFID_ClassModule_Constructor CoreID=0 */
0xbeef0866, /* 102 [classID = TypeConversion] */
0x00000101, /* 0x00000101 [nIO. numIn=1. numOut=1. numScratch=0] */
0x00000002, /* 2 [argCount] */
0x00000006, /* 0x00000006 [wire 0] */
0x00000002, /* 0x00000002 [wire 1] */
0x00000000, /* 0x00000000 [arg 0] : inputType = 0 */
0x00000001, /* 0x00000001 [arg 1] : outputType = 1 */
0x00040010, /* PFID_ClassLayout_Constructor CoreID=0 */
0x00000004, /* 4 [numModules] */
0x00000001, /* 1 [divider] */
0x0008002f, /* PFID_AddModuleToLayout CoreID=0 */
0x0000000b, /* 0x0000000b [Layout address] */
0x00000000, /* 0 [startIndex] */
0x00000007, /* 0x00000007 [Module pointer 0] */
0x00000008, /* 0x00000008 [Module pointer 1] */
0x00000009, /* 0x00000009 [Module pointer 2] */
0x0000000a, /* 0x0000000a [Module pointer 3] */
0x0002001b, /* PFID_StartAudio */
};
unsigned InitCommands_Len = sizeof(InitCommands)/sizeof(*InitCommands); // Length should be 84
9:09am
Hi David,
Could you please check the API's of awe_pltAudioStop() and awe_pltAudioStart() in your code? These functions should return 0 always, which is there in the reference BSP. I hope this helps.
Thank you.
Best Regards,
MM
3:12am
Hi MM
Yes both resturn 0 as in the original calls. The only difference is I call my own versions of AudioStart() and AudioStop() which eseentially just sets a flag to bypass the Audioweaver interrupt code rather than shut down interrupts all together and restart them.
Seemed to work OK in the earlier BSP.
Regards
David
///-----------------------------------------------------------------------------
/// @name INT32 awe_pltAudioStart(void)
/// @brief Start audio processing
///-----------------------------------------------------------------------------
AWE_OPTIMIZE_FOR_SPACE
AWE_FW_SLOW_CODE
INT32 awe_pltAudioStart(void)
{
if (s_AudioRunning != 0)
{
return E_AUDIO_ALREADY_STARTED;
}
// At this point the model is fully instantiated and the control I/O can be setup
ControlInit();
AudioStart(); // Overwritten in AWENew.c
// Mark the audio as started
s_AudioRunning = 1;
return 0;
} // End awe_pltAudioStart
///-----------------------------------------------------------------------------
/// @name INT32 awe_pltAudioStop(void)
/// @brief Stop audio processing
///-----------------------------------------------------------------------------
AWE_OPTIMIZE_FOR_SPACE
AWE_FW_SLOW_CODE
INT32 awe_pltAudioStop(void)
{
if (s_AudioRunning == 0)
{
return E_AUDIO_ALREADY_STOPPED;
}
AudioStop(); // Overwritten in AWENew.c
// Mark the audio as stopped
s_AudioRunning = 0;
return 0;
} // End awe_pltAudioStop
7:53am
Hi David,
Please remove the statement
if (s_AudioRunning != 0)
{
return E_AUDIO_ALREADY_STARTED;
}
from StartAudio() or change it to
if (s_AudioRunning != 0)
{
return 0;
}
Similarly remove the statement
if (s_AudioRunning == 0)
{
return E_AUDIO_ALREADY_STOPPED;
}
from StopAudio() or change it to
if (s_AudioRunning == 0)
{
return 0;
}
Please try with above changes and let me know if you still find issues.
Thank you.
Best Regards,
MM
9:42am
Yes that did the trick thankyou ;)
Is there a function call that retrieves information about the currently running file such as file name etc ?
Also it looks like you can add more than one AWB file to the flash memory drive so is there a way of loading these different configurations using their file name etc ?
Regards
David
2:13pm
Hey David,
We do not have a function that retrieves info about the currently running file. Nor can you specify which file to load by name alone.
The way to select which AWB file to load at startup is to set the attribute value to 26 when you write it to flash.
-Axel