ΣSigmaStudio Ask AI Русский Log in

DM1 programming problem with adau1467

SigmaDSP & SigmaStudio alexjaw69 May 17, 2019 00:00 0 replies Original on forum ↗
Subscribe
alexjaw69 Question
May 17, 2019 00:00

Hi all,

We have problem to write more than 24672 bytes to DM1. The is no problem to write larger amount by interfacing sigmastudio (4.2) directly to the dsp. But we are using an mcu to program the dsp over i2c. When we try to transfer larger amounts than 24672, we do not get any audio output, CORE_STATUS 0xF405 = 3, i.e. sleep.

Details:

We are using an external mcu to program the dsp over i2c. This has worked so far, but recently we had to increase delay in a block which increased the size of the RAM required by the dsp. So, we generated the system files with sigmastudio. Incorporated the c/h files to the mcu code. Now, we do not have any audio out anymore. Downloading the code from sigmastudio directly to the dsp works and we have audio out. After some testing we could identify that it was loading (with mcu) of the dm1 data that was causing the problem.

Code snippet from the header file

/* DSP Ram Data */

#define DM1_DATA_SIZE_IC_1 25424

#define DM1_DATA_ADDR_IC_1 24576

ADI_REG_TYPE DM1_DATA_Data_IC_1[DM1_DATA_SIZE_IC_1] = { ...lots of 0x00... }

The downloading is performed as usual with default_download_IC_1() defined in the same header. Everything generated from sigmastudio.

Compiler output:

ADAU145X Assembler, Analog Devices Inc.

Version: 4.2.1,1755 (built 8/23/2018)

##### Compile Started: Thursday, May 16, 2019 6:50:27 AM #####

ADAU145X Assembler, Analog Devices Inc.

Version: 4.2.1,1755 (built 8/23/2018)

##### Compile Started: Thursday, May 16, 2019 6:50:27 AM #####

##### Compile succeeded: 0 errors, 0 warnings #####

##### Summary #####

DM0 RAM used: 00161 (of 40960)

DM1 RAM used: 06351 (of 40960)

PM RAM used(Data): 00000 (of 24576)

PM RAM used(Inst): 00478 (of 24576) 328 instructions (32bit: 178 64bit: 150)

Total PM used: 00478 (of 24576)

We believe that the problem is caused by the size of DM1 and that some of it should be split between page 1 and page 2. Is that correct? From the data sheet, page 92, it seems that the first 0xAFFF - 0x6000 = 20480 bytes should go into page 1 (lower), and the remaining bytes to page 2 (upper). We find it strange that this is not included automatically in the system files generated by sigmastudio. There is no command in the the default_download() function with the address 0xF899 that sets page state (also not in TxBuffer_IC_1.dat).

Or is the calculation wrong - each page can take 20480 32-bit words, i.e. 81920 bytes. Then, it’s not paging that is our problem. However, we are consistently failing when we write more than 24672 bytes, i.e. we fail when we try to write 24672+4=24676 bytes and more. No audio output and CORE_STATUS 0xF405 = 3, i.e. sleep. Have checked that there is now overflow in the buffers that are engaged in the transfer. i2c speed set to 100kHz.

For the moment we only write 24576 bytes (of the 25424) to DM1. The application works but it seems dangerous to omit the complete reset of required DM1 size of 25424 with 0x00.

We also find it strange that the size of DM1 is different in the compiler output, 06351 = 25404 bytes, and the size in the header, 25424 bytes. A difference of 20 bytes!

Audio Signal Processors

ADAU1467 SigmaStudio SigmaDSP

i2c

microcontroller

adau1467

programming dsp

dm1

SigmaDSP Audio Processors

Show More