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

ADAU1701 VuMeter Missing parameter address, how can i read that?

SigmaDSP & SigmaStudio Rocha Jul 15, 2020 00:00 1 replies Original on forum ↗
Thread Summary

Thread Summary

The user is trying to read VU meter levels from a DSP project in Sigma Studio but lacks the parameter addresses. The solution involves using Data Capture registers (0x081A to 0x081B) to capture the 24-bit data from the program, specifically at the 13th instruction where the linX parameter is calculated. The low-instruction meter does not average levels, leading to potential inaccuracies, but can be sufficient for basic signal detection.
AI Generated Content
Subscribe
Rocha Question
Jul 15, 2020 00:00

Hi Guys,

Im working on a VU Meter read from DSP, trying to read inside Sigma Studio ( on a microcontroller too), i have create a basic project, exported files and that files does not have parameters address for read vu meter level, so i need help on how can i do that, see attached project, any hel will be apreciated, thanks.

Level.rar Attached file

name_IC_1_PARAM.h

#ifndef __CODE_IC_1_PARAM_H__
#define __CODE_IC_1_PARAM_H__

/* Module Mute1 - Mute*/
#define MOD_MUTE1_COUNT 1
#define MOD_MUTE1_DEVICE "IC1"
#define MOD_MUTE1_MUTENOSLEWALG1MUTE_ADDR 0
#define MOD_MUTE1_MUTENOSLEWALG1MUTE_FIXPT 0x00800000
#define MOD_MUTE1_MUTENOSLEWALG1MUTE_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1)
#define MOD_MUTE1_MUTENOSLEWALG1MUTE_TYPE SIGMASTUDIOTYPE_FIXPOINT

#endif

name.params

Cell Name = Mute1
Parameter Name = MuteNoSlewAlg1mute
Parameter Address = 0
Parameter Value = 1
Parameter Data :
0x00 , 0x80 , 0x00 , 0x00 ,

Parameter data for: IC 1 (Hexadecimal format starting at parameter address 0)
See also CODE.hex file
0x00 , 0x80 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 ,
Removed remain zeros!!!

Parameter data for: IC 1 (Binary format starting at parameter address 0)
00000000 10000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
Removed remain zeros!!!

That code has been produced by Sigma Studio 4.5 build 1779

Edit Notes
Added Sigma Studio version to help solving

[edited by: Rocha at 5:03 PM (GMT 0) on 15 Jul 2020]

Audio Signal Processors

VuMeter level

SigmaDSP Audio Processors

adau1701

Level.png
Level.png
Level.rar4.5 KB
DaveThib Reply
Jul 22, 2020 00:00

Hello Rocha,

This gets a little complicated but I will take it one step at a time and give explanations.

This SigmaDSP is one of the early generations of SigmaDSP and reading back data from within the running program is a little tricky. You may be aware that when you put in a readback in your program it only picks up the top 24 bits of the 28 bit audio in the core. So if you want to see the bottom four bits you have to multiple the data by 16 then read it using a readback cell.

To get data from the program that is running you have to use the Data Capture registers.

2074 TO 2075 (0x081A TO 0x081B)—DATA CAPTURE REGISTERS

This is on page 38 in the datasheet.

So how this works is to set the address of the instruction in the program. So when that instruction is executed, it will transfer the selected data into the capture register. The register is only 24 bits wide so that is why the readback is limited to 24 bits.

So when the meter data is being calculated, at that point you need to read the accumulator. So you need to know what instruction that this happens. This is detailed in a text file called trap.dat.

Here is where you find it:

Inside the IC_1 folder.

Here is the contents of your file:

I would use the linX parameter which is shown at instruction 13. So it is the 13th instruction of the program and that is what you put into the data capture register.

The meter you are using is a low instruction version. This means that it does not average the level data at all. So all you are getting is the level at that instant. That sample. So you have to get the absolute value and average the level. Since you can only read the port at a fairly slow rate as compared to the audio rate. So you will be missing some quick peaks and the level will not be very accurate. It is good enough to see that there is a signal as you see in SigmaStudio. The other level meter will average the level over time. You set the hold time to something like 10ms and then read the data every 10ms and you will not miss a peak. But, it uses more instructions. Your call on that one.

Dave T

pastedimage1595452608288v1.png
pastedimage1595452608288v1.png
pastedimage1595452668130v2.png
pastedimage1595452668130v2.png