AnsweredAssumed Answered

A BUG somewhere ... either "Capture Window" or "Export System Files" is wrong

Question asked by dzingoni on Feb 10, 2013
Latest reply on Feb 11, 2013 by BrettG

Hi everybody,

I'm using Sigmastudio 3.8 with an adau 1701, and have been working with it for some time.

Being ready to implement some external biquad coefficient calculation and to write them inthe DSP I was making some tests, and noticed that

there are always some differences between the hex codes displayed in the Capture Window and those exported by "Export System files".

 

Let's make an example, using a simple General 2nd order IIR. I set up as a simple parametric filter with only 3 dB of boost at 1000 hz.

We can see the calculated values in the capture window, the green lines.

exp_error.PNG

Now we perform a compile, link, download and then export system files.

One of the exported files contains the parameters for the filter, we can see the in the right part of the picture.

Confronting the numbers ... we see that they are similar but not equal.

For instance:

the first parameter (name: EQ1940Dual10B1) is 1.01676738262177 (Hex: 0x00,     0x82,     0x25,     0x6F) in the capture window, and

its corresponding #define is

#define MOD_GENFILTER1_ALG0_STAGE0_B0_ADDR         0
#define MOD_GENFILTER1_ALG0_STAGE0_B0_FIXPT        0x0082256E
#define MOD_GENFILTER1_ALG0_STAGE0_B0_VALUE        SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1.01676736897541)

 

so the values differ in the last byte (and some decimals in the floating point number).

Which of the two is wrong?

If I compile my microcontroller code using the generated code I will load 0x0082256E , but I see that Sigmastudio loaded 0x0082256F ....

I know it's just the LSB bit, but there must be some bug in the internals of Sigmastudio somewhere, maybe a different way of truncating the decimals ...

Am I wrong?

Best regards.

Outcomes