I change the block size as followed:IC1->set bolck size,and I change the value instead of 64.then the project can be downloaded. But nothing to be sounded.
Anything else need to be done for this ?
The host BlockSize (BlockSize set on SigmaStudio) must be a value less than or equal to the application BlockSize (number of audio samples per channel passes to the process API per API call in the target application) and should also be a factor of application BlockSize. For e.g. when the application BlockSize is 64, user can set 8, 16, 32, 64 etc. as the host BlockSize.
The application BlockSize set on the default LDR files is 64. In case, the host BlockSIze is modified to a value greater than 64, or a value that is not a factor of 64, then you will have to rebuild the LDR after modifying the application BlockSize. Application BlockSize can be modified by changing the macro NUM_SAMPLES in app.h
I try to change the block size as 128,512.It is OK .But if I change the macro NUM_SAMPLES as 1024, an error is shown when building the project.:"Error: the size of an array must be greater than zero float32_t adi_ss_mem4[ADI_SS_SIZE_BLOCK_4];".
In the default application, the size of the state (adi_ss_mem4) and parameter (adi_ss_mem5) buffers are defined such that maximum available memory is allocated towards these two buffers. Please refer to the macro definition for ADI_SS_SIZE_BLOCK_4 and ADI_SS_SIZE_BLOCK_5 in app.c. When the total memory requirement of the application goes up (ie total available memory comes down), the size of these buffers comes down.
When the BlockSize is increased, the overall memory requirement of the application also goes up, because the size of buffers like input/output buffers, SPORT buffers etc are linked to BlockSize. Hence the size of adi_ss_mem4 and adi_ss_mem5 buffers comes down. As per the computation, the size of adi_ss_mem4 is negative when BlockSize is set to 1024. This is the reason for the above error.
Hence either use a lower BlockSize or modify the application with a different memory allocation. If the schematic BlockSize is 128, it is advised to set NUM_SAMPLES as 128. This is because, the lower the NUM_SAMPLES, lower will be the SPORT and input/output buffer size and hence higher will be memory available for State and Parameter buffers.
Thank you! I still have some doubts about this problem.What is the meaning of "64" in the "#define MEMORY_USAGE_FACTOR_BLK1 (48*(NUM_SAMPLES-64))".Can I change the value "64" or extend the size of the block4 directly?
As mentioned in the earlier post, the size of the state (adi_ss_mem4) and parameter (adi_ss_mem5) buffers are defined such that maximum available memory is allocated towards these two buffers. When the NUM_SAMPLES is increased, the memory allocated for adi_ss_mem4 and adi_ss_mem5 are reduced. This is managed using MEMORY_USAGE_FACTOR_BLK1 and MEMORY_USAGE_FACTOR_BLK2. Default NUM_SAMPLES value is 64. When NUM_SAMPLES = 64, both MEMORY_USAGE_FACTOR_BLK1 and MEMORY_USAGE_FACTOR_BLK2 are 0. When NUM_SAMPLES is greater than 64, both MEMORY_USAGE_FACTOR_BLK1 and MEMORY_USAGE_FACTOR_BLK2 will be greater than 0 and hence size of adi_ss_mem4 and adi_ss_mem5 comes down.
If I want to set the block size as 1024,how can I get it in details? Is it just change the size of the adi_ss_mem4?Can you give me some advice?
Changing the value of NUM_SAMPLES in app.h to 1024 will set the BlockSize in application to 1024.
You will face additional issues when the block size of the default application is increased to 1024. This issue is explained below:
When the BlockSize is increased to 1024, the size of each buffer will be 4k bytes (1024 samples per buffer and 4 bytes per sample). There are many such buffers used in the application (one for each input channel, one for each output channel, SPORT buffers etc.). Hence the overall memory requirement of the application increases and there will be hardly any memory left to allocate for adi_ss_mem4 from the on-chip memory. That is the reason for the above error message. If it's not necessary, such high BlockSize values are not recommended, because of large memory consumption.
The above issue can be solved by either moving adi_ss_mem4 to the external memory or moving some of the application buffers to the external memory.
Found a problem about set the BlockSize in sigmastuio 。
Many controls can not be used, for example Sine Tone、 Square wave 、Triangle wave etc .The waveform completely wrong.what reason?
Sine Tone, Square Wave and Triangle Wave modules work for different BlockSizes. Could you please help us to understand the problem by elaborating more on the issue that you are facing? If you can share the schematic that is creating the issue, that will help us to understand the problem better.
With Best Regards,
Retrieving data ...