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

SigmaStudio: problem entering large b1 values for IIR filter

SigmaDSP & SigmaStudio SteveL Sep 19, 2011 00:00 5 replies Original on forum ↗
Subscribe
SteveL Question
Sep 19, 2011 00:00

Hi,

I'm on the very last section of the code for my current SigmaDSP project (using the ADAU1701) but have run into a problem when manually entering coefficient data for some IIR filters.

As I understand it, the coefficients are all in 5.23 format and can therefore have values up to (nearly) +/-16.000. However, I am unable to enter negative values larger than -5.000 into the b1 coefficient box - higher values are clipped to -5.000. The other coefficient boxes will all accept the full expected range, and b1 will accept larger positive numbers.

This occurs with both the index-slectable and fixed second-order filters and - of course - my filter needs a b1 value over -5.000.

Is this a quirk of SigmaStudio, or is there something special about b1 which I am not aware of? If the former, is there a workaround?

BTW, I saw that v3.4 of SigmaStudio claimed to fix an IIR Coefficient Window bug and hurriedly installed the upgrade, but it has made no difference.

Any help would be much appreciated!

Kind regards,

Steve L.

ADIApproved Reply
Sep 19, 2011 00:00

Hi Steve,

I was able to observe the issue you describe with the b1 coeff. I talked to the software guys and it is something they will look to fix in the next release. In the mean time you can manually write the coefficient to parameter RAM using the read/write window.

SteveL Reply
Sep 20, 2011 00:00

Hi,

Thanks very much for your reply. I'm glad to hear that there is a workaround, and the read/write window method should enable me to get something running.

I'm also going to need to program the EEPROM for standalone operation - is there any easy way to incorporate such manual changes into the EEPROM code too? Can the '1701's SRAM be read and then rewritten to the EEPROM, or do I need to identify the affected addresses and edit them manually?

Thanks and kind regards,

Steve L.

ADIApproved Reply
Sep 20, 2011 00:00

Hi Steve,

Unfortunately the EEPROM read/write tools are still a bit primitive and, in some cases, buggy.

There is, fortunately, a way to manually write to the EEPROM using SigmaStudio. I have described that method here. Scroll down to see Method 2: Manual EEPROM Generation.

Basically, if you read the datasheet section regarding EEPROM formatting, you'll see that each message has a header, address, and data. The method described in that link basically lets you create the address-data writes in the sequencer, and SigmaStudio will automatically add on the header and overhead bytes.

SteveL Reply
Sep 23, 2011 00:00

Hi Brett and, er, awalshe,

Thank you very much for your help.

I was able to use the read/write window to successfully force the problematic coefficient and test my filter.

Am still wrestling with SigmaStudio to try and program my EEPROMs. Following the process which Brett posted. I tried manually editing the coefficient value in the sequencer, but found that it results in a corrupted .HEX output file (containing lots of spurious tabs and wrong-length data) which crashed the EEPROM downloader if a write was attempted. Perhaps I wasn't supposed to do that, but on the face of it you can double-click on data in the sequencer and edit it. Anyway, I left the sequencer alone and edited the coefficient at the .HEX file level (searching for the incorrect data sequence then editing it to the correct values), which did the trick.

At that point I was able to load the .HEX file into the downloader and view it, at which point I noted that its length was 9280 bytes. It would appear that, despite my program using only 415/1024 program locations and 100/1022 parameters, SigmaStudio writes ALL memory locations to the EEPROM file regardless. That's a pain because, having read the part of the datasheet which states that "Most applications do not use the full program and parameter RAMs, so an 8 kB EEPROM should be sufficient", I have fitted an 8kB EEPROM to all my boards (SigmaStudio knows that, too - the EEPROM size is set to 8192 bytes).

Aha, I thought - I'll just not drag the unnecessary program/parameter writes from the capture window into the sequncer...but it seems that each section is treated as a block write which cannot be subdivided in that way. Neither can I remove lines in the sequencer without some kind of corruption occurring.

I'm now trying to edit the length manually at the .HEX file level, but am not hugely confident of success. I may need to bite the bullet and simply replace my EEPROMs with larger parts.

Hope this helps, or at least informs, anyone else trying to do the same thing.

Kind regards,

Steve L.

SteveL Reply
Sep 23, 2011 00:00

Hi,

OK - problem is solved. While the drag-writes-from-capture-window-into-sequencer method results in maximum-length (9280b) EEPROM files regardless of program length, using the standard method of generating production EEPROM files as described in this thread: http://ez.analog.com/thread/1625 results in a much shorter .HEX file containing only the essential writes.

Doing this and then manually editing the coefficient value as before worked fine and my board is now operating entirely independently of the PC.

Nearly there now!

Thanks and kind regards,

Steve L.